fix: add permissionMode: acceptEdits to worktree agents (#1334)
Worktree agents (gsd-executor, gsd-debugger) prompt for edit permissions on every new directory they touch, even when the user has "accept edits" enabled. This is caused by Claude Code's directory-scoped permission model not propagating to worktree paths. Setting permissionMode: acceptEdits in the agent frontmatter tells Claude Code to auto-approve file edits for these agents, bypassing the per- directory prompts. This is safe because these agents are already granted Write/Edit in their tools list and are spawned in isolated worktrees. - Add permissionMode: acceptEdits to gsd-executor.md frontmatter - Add permissionMode: acceptEdits to gsd-debugger.md frontmatter - Add regression tests verifying worktree agents have the field - Add test ensuring all isolation="worktree" spawns are covered Upstream: anthropics/claude-code#29110, anthropics/claude-code#28041 Fixes #1334 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
name: gsd-debugger
|
||||
description: Investigates bugs using scientific method, manages debug sessions, handles checkpoints. Spawned by /gsd:debug orchestrator.
|
||||
tools: Read, Write, Edit, Bash, Grep, Glob, WebSearch
|
||||
permissionMode: acceptEdits
|
||||
color: orange
|
||||
# hooks:
|
||||
# PostToolUse:
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
name: gsd-executor
|
||||
description: Executes GSD plans with atomic commits, deviation handling, checkpoint protocols, and state management. Spawned by execute-phase orchestrator or execute-plan command.
|
||||
tools: Read, Write, Edit, Bash, Grep, Glob
|
||||
permissionMode: acceptEdits
|
||||
color: yellow
|
||||
# hooks:
|
||||
# PostToolUse:
|
||||
|
||||
Reference in New Issue
Block a user