Claude workflows - Fix bubblewrap home mount setup - #10502
Merged
Conversation
Claude Code runs every Bash command under bubblewrap when CLAUDE_CODE_SUBPROCESS_ENV_SCRUB is set. The sandbox protects config dotfiles by bind-mounting over them and has bwrap create the mount point when the file is missing; one set of those paths lands in root-owned /home, so the create fails and the sandbox aborts before bash starts. Every Bash tool call in the session then dies with "bwrap: Can't create file at /home/.mcp.json: Permission denied", which reads like a per-command permission denial but is sandbox bootstrap failing. Pre-create those paths in the bubblewrap setup step so bwrap binds over something that already exists. Ref: anthropics/claude-code#17258 (do nothing)
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.
Summary
/homedirectoryRoot cause
With
CLAUDE_CODE_SUBPROCESS_ENV_SCRUB=1, Claude runs Bash through bubblewrap. When a protected config target such as/home/.mcp.jsondoes not exist, bubblewrap attempts to create it beneath root-owned/homeand aborts before Bash starts.Verification
actionlintpasses forclaude.ymlandclaude-code-review.ymlgit diff --checkpasses