Repository navigation
docs: separate the worktree move's permission check from folder trust - #93
Merged
Merged
Conversation
…lder trust The approve-worktree-move hook answers Claude Code's permission check for change_directory, but the desktop app then asks on its own before moving a session into a folder outside every trusted folder, and no hook can answer that. Worktrees sit beside the main checkout, so each new one asked once. Say so in the hook, the hooks README, the parallel-agents guide, /adf:dispatch, and the skeleton's matching lines, and explain how to end it: trust the folder that holds the main checkout and its worktrees, once. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…lder-trust # Conflicts: # CHANGELOG.md
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.
What and why
The approve-worktree-move hook approves
change_directoryinto a worktree of the session's repository, and the docs said that meant no prompt. It answers only Claude Code's permission check: the desktop app then runs its own folder-trust check ("This folder isn't in a workspace you've trusted") before moving the session, and no hook can answer it. Worktrees are siblings of the main checkout, so trusting the main checkout doesn't cover them, and each new worktree asked once.This corrects the claim and says how to end the prompt: trust the folder that holds the main checkout and its worktrees, once.
plugins/adf/hooks/approve-worktree-move.sh: header comment (no behavior change)plugins/adf/hooks/README.md: table row, and a new § Moving into a worktreeplugins/adf/docs/PARALLEL-AGENTS.mdand/adf:dispatch: the desktop-app step; dispatch tells the developer once after a move the app asked aboutskeleton/.claude/hooks/config.sh,skeleton/.claude/rules/claude-code.md,docs/ONBOARDING.md: the matching linesCHANGELOG.md: entry with upgrade impactVerification
allow, yet the app still showed its trust prompt, so the prompt is the app's own check.python3 scripts/build-committed.py --check: round trip unchanged../evals/run-evals.sh: all pass exceptworktree-new: with 2 slots, two worktrees take both ports, which fails the same way onmainwithout this change.Not verified: that trusting the parent folder covers worktrees created later in the desktop app. Claude Code's own trust covers subfolders; the app's check is assumed to work the same way.
🤖 Generated with Claude Code