Warn on CLAUDE_CODE_SUBPROCESS_ENV_SCRUB permission-mode downgrade - #511
Open
jesserobbins wants to merge 7 commits into
Open
Warn on CLAUDE_CODE_SUBPROCESS_ENV_SCRUB permission-mode downgrade#511jesserobbins wants to merge 7 commits into
jesserobbins wants to merge 7 commits into
Conversation
Author
|
I think this is ready now @clkao |
jesserobbins
marked this pull request as ready for review
July 14, 2026 22:12
Author
|
@clkao it felt like a lot of touches for a single environment variable. As you can see this is mostly just tests and documentation which is probably too verbose but seems to follow the project. Let me know if you want different issue. I ran this through my custom roborev loop across claude, codex, and pi. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
I run
CLAUDE_CODE_SUBPROCESS_ENV_SCRUB=1globally as recommended credential-scrubbing hardening, and it silently downgraded everyspacedock claudedispatch to prompt-on-everything — the two compose badly, and nothing told me why until I went digging. Rather than route around Claude Code's own hardening by guessing an--allowedToolsallowlist on the operator's behalf, spacedock should just tell you what's happening and point at the fix.Summary
spacedock claudenow warns on stderr at launch whenCLAUDE_CODE_SUBPROCESS_ENV_SCRUBis set and--allowedToolswasn't declared — fires on both the unsandboxed and--safehouselaunch pathsspacedock doctor --host claudeprints the same advisory as an informational stdout note (never affects the exit code)hasEnv/envValueOf) instead of adding a third near-duplicate copyTest plan
go test ./internal/cli/...— new tests cover truthy/falsy parsing, both launch paths, both suppression cases, and doctor host-scopinggo test ./...— no new failures (2 pre-existing, unrelated failures on this machine:TestCodexResolveManifestAgainstInstalledHost,TestSurveyCodexPresenceThroughSync)go test ./... -race— cleangofmt -l ./cmd ./internal— clean except a pre-existing unrelated file (internal/release/journeydelta.go, unformatted onmainbefore this branch)Closes #504