Repository navigation
fix: refuse the host's approval prompt for a shell command while a build or drain runs - #1116
Merged
Merged
Conversation
…ild or drain runs A host approval prompt for a shell command stalls an autonomous run: the host asks the person to approve a command it cannot check, and with nobody at the terminal the run waits. The host's PermissionRequest event for the shell tool now reaches abcd (hooks/permission-request.sh, `abcd hook permission-request`). While a build or drain runs for the session's checkout, or the session is one of a running build's lanes, the prompt is refused with a message telling the agent to rewrite the command into plain steps abcd can check, or skip the step and say why. abcd never grants a prompt. A run counts while it is unfinished, waits on no person, and its state was written within the reservation lease; every other session, tool and error leaves the host's prompt as it is. build and drain say once as they start that refusals are on. The session that wrote this died before committing it (last edit 2026-10-17 13:38); it is committed as found after the 2026-10-22 crash triage, with the records it wrote: the major it fixes, and two minor follow-ups it leaves open (a person-run switch for refusal outside a run, and a sandbox in place of the refusal). Resolves: iss-2610171110154902 Refs: iss-2610171200535090 Refs: iss-2610171200549757 Assisted-by: Claude:claude-opus-5-5
…guard answers the rest The build and drain pages, their briefs and the start notice said every lane's prompts were refused and that abcd never approves a prompt. A lane started through the claude runner runs with the host's hooks off (--bare), so the PermissionRequest hook never sees its prompts; the guard answers them as that runner's permission prompt answerer (`abcd guard approve`), which approves a command it reads whole and clears. The claim is now the hook's: it never grants a prompt, and a runner lane's prompts are the guard's. Refs: iss-2610171110154902 Assisted-by: Claude:claude-opus-5-5
…used The notice a pick prints as it starts a run had no test: deleting it left the suite green. The test checks a pick's stderr carries it once and its --json stdout stays whole; it fails with the notice removed. Refs: iss-2610171110154902 Assisted-by: Claude:claude-opus-5-5
The lane match counted any lane whose worktree is the session's, whatever its stage, so a person opening a done or discarded lane's worktree to look at it had every approval prompt refused while a sibling lane kept the run unfinished. A lane now counts only while it has work left. The test fails on the old match. Refs: iss-2610171110154902 Assisted-by: Claude:claude-opus-5-5
A run that died after its last write still counts for two hours, so an attended session in that checkout has its prompts refused behind a message saying a run is going. The refusal now says that the refusal ends two hours after the run last wrote its state, so an agent with a person at the terminal can tell them. A switch to end it early is iss-2610171200535090. Refs: iss-2610171110154902 Refs: iss-2610171200535090 Assisted-by: Claude:claude-opus-5-5
The review of the prompt refusal found the loop's samePath compares resolved strings, so two spellings of one directory differing in case compare unequal on a case-insensitive file system. For the refusal it fails open; six other loop call sites share the helper, so changing it is its own change. Refs: iss-2610222047465878 Assisted-by: Claude:claude-opus-5-5
… command The brief's chapter prose states no command shape (the appendix does), and the narrowed claim about runner lanes named the guard's answering verb inline, which the brief's own prose test refuses. Refs: iss-2610171110154902 Assisted-by: Claude:claude-opus-5-5
Four conflicts, each resolved as the union of both sides: the hook manifest now wires ten event types (PermissionRequest beside Stop and StopFailure), the sweep's warning ceiling counts both new launchers' warns, and the CLI registers both hook commands and their timeouts. Assisted-by: Claude:claude-opus-5-5
Assisted-by: Claude:claude-opus-5-5
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.
A host approval prompt for a shell command stalls an autonomous run. The host asks the person to approve a command it cannot check, and with nobody at the terminal the run waits until someone comes back.
What changes
hooks/permission-request.shrunsabcd hook permission-request.abcd guard approve), as the build and drain pages now say.Records
A session wrote this work on 2026-10-17 and died before committing it. It was recovered after the 2026-10-22 crash, committed as found, merged with main, and then reviewed. An Opus and Sonnet pair reviewed it, and both rounds' findings are folded in:
build nextnotice had no test; it now has one.Each new test was watched failing first.
Resolves: iss-2610171110154902
Refs: iss-2610171200535090
Refs: iss-2610171200549757
Refs: iss-2610222047465878
Assisted-by: Claude:claude-opus-5-5