You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
source-control: worktree skill's git worktree add/remove run through Bash, which the 2.1.323 sandbox refuses as read-only #17901
needs-triageNot yet classified. Floor until a type and one priority tier are set.session-ownedA local Claude Code session owns this work; factory lanes skip it.
Split from the changelog release issue(s) above under the owner's decision of 2026-11-21 (melodic-software/architecture#148): one issue per handoff row, rows that edit the same file grouped.
Route: lane work. Basis: correctness: the skill fails for sandboxed sessions.
Problem
Row 14 of #15693 (key changelog:2.1.323..2.1.323:adopt:plugins/source-control/skills/worktree/SKILL.md). Required sentence: the worktree skill creates and removes worktrees with git worktree add/remove through the Bash tool. The macOS/Linux sandbox now refuses these as read-only, as it does commits in a worktree the session was not started in or given. The skill needs a route that works with the sandbox on.
On main the word "sandbox" appears nowhere under plugins/source-control/skills/worktree/. The create path runs plugins/source-control/scripts/worktree-create.sh (git worktree add), and context/cleanup.md runs git worktree remove. The sandboxing page still said, when filed, that writes to the shared .git are allowed in a linked worktree (docs-lag).
Done when
A probe on current Claude Code with the sandbox on records which of create, remove and commit fail, and the owner picks the route (native EnterWorktree/ExitWorktree, an excludedCommands entry, or a documented sandbox-off requirement).
The worktree skill states the chosen route for sandboxed sessions, with a pointer and recheck trigger.
Size: Small
Complexity: Medium
Uncertainty: Knowable
Flags: intent
Blocked by: none
Blast radius: the source-control worktree skill (SKILL.md, context/cleanup.md, possibly scripts/worktree-create.sh) and every sandboxed session that creates or removes worktrees.
Reversible: yes; revert the doc or skill edit.
Open questions:
Which route should the worktree skill take for sandboxed sessions: native EnterWorktree/ExitWorktree, an excludedCommands entry, or a documented sandbox-off requirement? The issue lists all three and picks none.
RECOMMENDED: native EnterWorktree/ExitWorktree. Basis: it needs no sandbox exemption and no weakened sandbox; confirm with the probe of create, remove and commit under the sandbox. Related: source-control: ExitWorktree remove no longer deletes another running session's worktree (2.1.330) #17829 covers ExitWorktree remove behavior on 2.1.330.
To answer, post a comment that starts with this line:
**Decision recorded.** <answer>
I read this as a bug: the worktree skill's git worktree add/remove through Bash fail under the 2.1.323 sandbox, and the skill says nothing about the sandbox. The sandbox-on probe is a separate step that may not run in this lane. No merged pull request that fixes this turned up.
Refinement. A read-only run explored this repository, searched its issues and pull requests, and read the allowed docs to draft what follows. On an issue a listed human filed, it counts as the issue's spec once posted, while unedited; it is still model text, so check it.
Intended outcome: The worktree skill states a sandbox-compatible route for creating, removing and committing in worktrees, most likely the native EnterWorktree/ExitWorktree tools, with a pointer and recheck trigger.
Which route should the worktree skill take for sandboxed sessions: native EnterWorktree/ExitWorktree, an excludedCommands entry, or a documented sandbox-off requirement?
RECOMMENDED: Native EnterWorktree/ExitWorktree for create and enter, since it needs no sandbox exemption. Basis: plugins/source-control/CHANGELOG.md:5332 (skill already routes to the built-in tools, but never passes action remove)
Removal: the skill never passes ExitWorktree action remove and cleanup runs git worktree remove through Bash. Which sandbox-compatible route should cleanup take, given #17829 reports ExitWorktree remove misbehaving on 2.1.330?
RECOMMENDED: Document that cleanup removal needs an excludedCommands entry for git worktree remove, until #17829 is resolved, then recheck. Basis: judgment
The first done-when item needs a probe of create, remove and commit with the sandbox on, and no unattended run can do that. Who runs it, and may the work proceed on documented assumptions instead?
RECOMMENDED: The owner runs the probe on current Claude Code and records the results in the issue; the lane then writes the skill text from them. Basis: judgment
What recheck trigger should the skill state?
RECOMMENDED: Recheck when the sandboxing docs page changes its statement on writes to the shared .git in a linked worktree, or on each Claude Code release that touches the sandbox. Basis: judgment
Sources read
refine-data/context.json: issue 17901 body and triage, no owner decision comment
plugins/source-control/CHANGELOG.md:5332: worktree skill routes to built-in EnterWorktree and ExitWorktree, never passing action remove, removal stays with cleanup
plugins/source-control/CHANGELOG.md:4853: worktree create skips EnterWorktree with no user present
plugins/source-control/.claude-plugin/plugin.json:106: hooks cover raw Bash git worktree add
To answer, post a comment that starts with this line:
**Decision recorded.** <answer>
Automated refinement by the lanes App. Answer with a comment whose first line is **Decision recorded.**.
Probe for done-when 1, Claude Code 2.1.330 on Linux (WSL2), 2026-11-22 ~9:00 PM EST.
Method: headless claude -p sessions run under dontAsk mode, one command each. Every run reported permission_denials: [] and no unsandboxed call. Sandbox on: sandbox {enabled: true, autoAllowBashIfSandboxed: true, allowUnsandboxedCommands: false}. Control: the same settings with the sandbox off. The worktrees were made outside the session's working directory, where the worktree skill puts them.
Operation (session working directory)
Sandbox off
Sandbox on
git worktree add <root>/x -b b (main checkout)
ok
fails: fatal: could not create directory of '.git/worktrees/...': Read-only file system (exit 128), and the new branch is left behind
git worktree remove <root>/x (main checkout)
ok
fails: error: failed to delete '<root>/x': Read-only file system (exit 255)
all ok; removing a worktree that has commits asks for discard_changes: true
Current docs (sandboxing, read 2026-11-22): "when the working directory is a linked git worktree, the sandbox also allows writes to the main repository's shared .git directory so commands such as git commit can update refs and the index." The probe agrees: a commit works only when the session's working directory is that worktree.
A side finding not specific to worktrees: on this host, a signed commit fails in every sandboxed session (the SSH signing helper needs WSL interop, which the sandbox turns off).
Evidence favors the native EnterWorktree/ExitWorktree route. Choosing the route is the owner's step in done-when 1; the owner question is open.
needs-triageNot yet classified. Floor until a type and one priority tier are set.session-ownedA local Claude Code session owns this work; factory lanes skip it.
Activity
github-actions commentedon Nov 21, 2026
Size: Small
Complexity: Medium
Uncertainty: Knowable
Flags: intent
Blocked by: none
Blast radius: the source-control worktree skill (SKILL.md, context/cleanup.md, possibly scripts/worktree-create.sh) and every sandboxed session that creates or removes worktrees.
Reversible: yes; revert the doc or skill edit.
Open questions:
RECOMMENDED: native EnterWorktree/ExitWorktree. Basis: it needs no sandbox exemption and no weakened sandbox; confirm with the probe of create, remove and commit under the sandbox. Related: source-control: ExitWorktree remove no longer deletes another running session's worktree (2.1.330) #17829 covers ExitWorktree remove behavior on 2.1.330.
To answer, post a comment that starts with this line:
I read this as a bug: the worktree skill's
git worktree add/removethrough Bash fail under the 2.1.323 sandbox, and the skill says nothing about the sandbox. The sandbox-on probe is a separate step that may not run in this lane. No merged pull request that fixes this turned up.Automated triage. A maintainer reviews it.
melodic-automation-lanes commentedon Nov 21, 2026
The triage verdict left this issue at
needs-owner-decision:Reason:
intentmelodic-automation-lanes commentedon Nov 21, 2026
Refinement. A read-only run explored this repository, searched its issues and pull requests, and read the allowed docs to draft what follows. On an issue a listed human filed, it counts as the issue's spec once posted, while unedited; it is still model text, so check it.
Intended outcome: The worktree skill states a sandbox-compatible route for creating, removing and committing in worktrees, most likely the native EnterWorktree/ExitWorktree tools, with a pointer and recheck trigger.
Related work
Open questions
RECOMMENDED: Native EnterWorktree/ExitWorktree for create and enter, since it needs no sandbox exemption. Basis: plugins/source-control/CHANGELOG.md:5332 (skill already routes to the built-in tools, but never passes action remove)
RECOMMENDED: Document that cleanup removal needs an excludedCommands entry for git worktree remove, until #17829 is resolved, then recheck. Basis: judgment
RECOMMENDED: The owner runs the probe on current Claude Code and records the results in the issue; the lane then writes the skill text from them. Basis: judgment
RECOMMENDED: Recheck when the sandboxing docs page changes its statement on writes to the shared .git in a linked worktree, or on each Claude Code release that touches the sandbox. Basis: judgment
Sources read
To answer, post a comment that starts with this line:
Automated refinement by the lanes App. Answer with a comment whose first line is
**Decision recorded.**.kyle-sexton commentedon Nov 23, 2026
Probe for done-when 1, Claude Code 2.1.330 on Linux (WSL2), 2026-11-22 ~9:00 PM EST.
Method: headless
claude -psessions run underdontAskmode, one command each. Every run reportedpermission_denials: []and no unsandboxed call. Sandbox on:sandbox {enabled: true, autoAllowBashIfSandboxed: true, allowUnsandboxedCommands: false}. Control: the same settings with the sandbox off. The worktrees were made outside the session's working directory, where the worktree skill puts them.git worktree add <root>/x -b b(main checkout)fatal: could not create directory of '.git/worktrees/...': Read-only file system(exit 128), and the new branch is left behindgit worktree remove <root>/x(main checkout)error: failed to delete '<root>/x': Read-only file system(exit 255)git -C <worktree> commit --allow-empty(main checkout)fatal: Unable to create '.../.git/worktrees/.../index.lock': Read-only file systemgit commit --allow-empty(session started in the linked worktree)discard_changes: trueCurrent docs (sandboxing, read 2026-11-22): "when the working directory is a linked git worktree, the sandbox also allows writes to the main repository's shared
.gitdirectory so commands such asgit commitcan update refs and the index." The probe agrees: a commit works only when the session's working directory is that worktree.A side finding not specific to worktrees: on this host, a signed commit fails in every sandboxed session (the SSH signing helper needs WSL interop, which the sandbox turns off).
Evidence favors the native EnterWorktree/ExitWorktree route. Choosing the route is the owner's step in done-when 1; the owner question is open.