Lane: work (issue-execution loop, orchestrator dispatching per-issue subagents in out-of-tree worktrees) — also applies to source-control:babysit-prs
Category: operational
Triggering example
Running /work-items:work as an unattended /loop from a session whose cwd is the user's home directory (C:\Users\KyleSexton), not a repo clone. The orchestrator dispatched 4 implementation subagents, each of which: gh repo cloned the repo into a scratchpad temp dir, git checkout -b, git add/git commit, git push, gh pr create; the orchestrator itself ran gh issue comment / gh issue edit. Despite the session running in auto (acceptEdits) mode, the human was prompted to approve multiple operations — defeating the entire point of an unattended loop.
Observed vs expected
- Observed: unattended loop repeatedly stops for human approval. Two independent causes:
- cwd is not a repo → all real work happens outside the workspace root.
acceptEdits auto-approves Write/Edit only inside the workspace root. Subagents clone and edit under the scratchpad temp dir (outside the workspace), and no permissions.additionalDirectories entry covers it, so every out-of-tree file write prompts.
- The loop's core git/gh verbs are not in
permissions.allow. acceptEdits never auto-approves Bash — only the allowlist does. The current global allowlist covers git worktree add, git fetch, gh pr merge/ready, gh search *, gh label list, but not the verbs every issue-execution cycle needs: gh repo clone, git checkout/git switch, git add, git commit, git push (non-force), gh pr create, gh pr view/gh pr diff, gh issue view/list/comment/edit/create. Each prompts, per subagent.
- Expected: the autonomous work/babysit lanes ship a documented permission preflight so an operator can run them unattended without hand-approving routine git/gh operations — a canonical, security-reviewed allowlist recipe (force-push /
--no-verify / destructive verbs stay denied) plus additionalDirectories guidance for the out-of-tree worktree/clone root, and ideally a loop-start self-check that detects "cwd is not a git repo" and "required grants missing" and surfaces the exact gap once, up front, instead of mid-cycle prompts.
Category
operational
Suggested fix direction
- Ship a copy-pasteable, security-reviewed
permissions.allow recipe for the autonomous lanes (the verb list above), keeping the existing deny rails (force-push, --no-verify, git clean -fdx, reset --hard, secret reads) intact.
- Document a dedicated, trusted worktree/clone root (not the OS temp dir) and the matching
permissions.additionalDirectories entry so out-of-tree edits are auto-trusted.
- Add a loop-start preflight in
work (and babysit-prs) that detects cwd-not-a-repo and missing grants and reports the precise remediation once, rather than letting the loop discover it as per-operation prompts.
Related
Reference: Boris Cherny, "Steps of AI Adoption" (Google Doc)
Lane: work (issue-execution loop, orchestrator dispatching per-issue subagents in out-of-tree worktrees) — also applies to
source-control:babysit-prsCategory: operational
Triggering example
Running
/work-items:workas an unattended/loopfrom a session whose cwd is the user's home directory (C:\Users\KyleSexton), not a repo clone. The orchestrator dispatched 4 implementation subagents, each of which:gh repo cloned the repo into a scratchpad temp dir,git checkout -b,git add/git commit,git push,gh pr create; the orchestrator itself rangh issue comment/gh issue edit. Despite the session running in auto (acceptEdits) mode, the human was prompted to approve multiple operations — defeating the entire point of an unattended loop.Observed vs expected
acceptEditsauto-approvesWrite/Editonly inside the workspace root. Subagents clone and edit under the scratchpad temp dir (outside the workspace), and nopermissions.additionalDirectoriesentry covers it, so every out-of-tree file write prompts.permissions.allow.acceptEditsnever auto-approvesBash— only the allowlist does. The current global allowlist coversgit worktree add,git fetch,gh pr merge/ready,gh search *,gh label list, but not the verbs every issue-execution cycle needs:gh repo clone,git checkout/git switch,git add,git commit,git push(non-force),gh pr create,gh pr view/gh pr diff,gh issue view/list/comment/edit/create. Each prompts, per subagent.--no-verify/ destructive verbs stay denied) plusadditionalDirectoriesguidance for the out-of-tree worktree/clone root, and ideally a loop-start self-check that detects "cwd is not a git repo" and "required grants missing" and surfaces the exact gap once, up front, instead of mid-cycle prompts.Category
operational
Suggested fix direction
permissions.allowrecipe for the autonomous lanes (the verb list above), keeping the existingdenyrails (force-push,--no-verify,git clean -fdx,reset --hard, secret reads) intact.permissions.additionalDirectoriesentry so out-of-tree edits are auto-trusted.work(andbabysit-prs) that detects cwd-not-a-repo and missing grants and reports the precise remediation once, rather than letting the loop discover it as per-operation prompts.Related
Reference: Boris Cherny, "Steps of AI Adoption" (Google Doc)