File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 7272 # letting the Claude Code install fail later with a less obvious error.
7373 bwrap --ro-bind / / --unshare-user true
7474 echo "bubblewrap ready: $(bwrap --version)"
75+ # The sandbox keeps commands from editing config dotfiles by bind-mounting
76+ # over each one, and bwrap has to CREATE the mount point when the file does
77+ # not exist. One set of those paths resolves under /home, which is root-owned
78+ # on the runner, so the create fails and the sandbox aborts before bash ever
79+ # starts. Every Bash tool call in the session then dies with
80+ # bwrap: Can't create file at /home/.mcp.json: Permission denied
81+ # which reads like a permissions denial on the command but is really sandbox
82+ # bootstrap failing. Pre-create the paths so bwrap binds over something that
83+ # already exists. Ref: https://github.com/anthropics/claude-code/issues/17258
84+ for name in .gitconfig .gitmodules .bashrc .bash_profile .zshrc .zprofile .profile .ripgreprc; do
85+ [ -e "/home/$name" ] || sudo install -m 644 /dev/null "/home/$name"
86+ done
87+ # Valid-but-empty JSON rather than a zero-byte file, in case anything on the
88+ # runner parses this one as an MCP config instead of just mounting over it.
89+ [ -e /home/.mcp.json ] || printf '{"mcpServers":{}}\n' | sudo tee /home/.mcp.json > /dev/null
90+ for name in .vscode .idea .claude/commands .claude/agents; do
91+ [ -d "/home/$name" ] || sudo install -d -m 755 "/home/$name"
92+ done
93+ echo "sandbox mount points ready in /home"
7594
7695 - name : Run Claude Code Review
7796 id : claude-review
Original file line number Diff line number Diff line change 6666 # letting the Claude Code install fail later with a less obvious error.
6767 bwrap --ro-bind / / --unshare-user true
6868 echo "bubblewrap ready: $(bwrap --version)"
69+ # The sandbox keeps commands from editing config dotfiles by bind-mounting
70+ # over each one, and bwrap has to CREATE the mount point when the file does
71+ # not exist. One set of those paths resolves under /home, which is root-owned
72+ # on the runner, so the create fails and the sandbox aborts before bash ever
73+ # starts. Every Bash tool call in the session then dies with
74+ # bwrap: Can't create file at /home/.mcp.json: Permission denied
75+ # which reads like a permissions denial on the command but is really sandbox
76+ # bootstrap failing. Pre-create the paths so bwrap binds over something that
77+ # already exists. Ref: https://github.com/anthropics/claude-code/issues/17258
78+ for name in .gitconfig .gitmodules .bashrc .bash_profile .zshrc .zprofile .profile .ripgreprc; do
79+ [ -e "/home/$name" ] || sudo install -m 644 /dev/null "/home/$name"
80+ done
81+ # Valid-but-empty JSON rather than a zero-byte file, in case anything on the
82+ # runner parses this one as an MCP config instead of just mounting over it.
83+ [ -e /home/.mcp.json ] || printf '{"mcpServers":{}}\n' | sudo tee /home/.mcp.json > /dev/null
84+ for name in .vscode .idea .claude/commands .claude/agents; do
85+ [ -d "/home/$name" ] || sudo install -d -m 755 "/home/$name"
86+ done
87+ echo "sandbox mount points ready in /home"
6988
7089 - name : Run Claude Code
7190 id : claude
You can’t perform that action at this time.
0 commit comments