Pipeline agents cannot submit handoffs inside a worktree session #1415
Labels
No labels
P0
P1
P2
P3
bug
category/code-change
category/cross-repo
category/eval-run
category/investigation
category/no-test-target
category/owner-ruling
category/prose-artifact
category/recurring-chore
category/structure
category/umbrella
crc-refactor
create
delete
enhancement
filed-by/agent
filed-by/user
frozen
lint-rule
needs-info
needs-triage
next
plugin/cc-architect
plugin/os
plugin/os-adr
plugin/os-aidd-lint
plugin/os-backlog
plugin/os-context
plugin/os-doc-hygiene
plugin/os-sdlc
plugin/os-vault
project/cc-os
ready-for-agent
ready-for-human
recurring
review
rule-proposal
update
waiting
wayfinder:grilling
wayfinder:map
wayfinder:map
wayfinder:research
wayfinder:task
wayfinder:task
wontfix
worklist/deviations
worklist/lint-rule
worklist/new-implement-build
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
jared/cc-os#1415
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
In a worktree session, pipeline agents cannot submit their handoff with
os-sdlc-subagent-stop --json '<payload>'. The Claude Code shell guard refuses the command. Leaving the worktree lets the submit through, but it breaks the run silently: SubagentStart then builds each brief from the main checkout, so the briefs miss every change in the worktree.Observed
Ticket #1111, implementation 178, dispatch 1557 (change-auditor). The guard refused the
--jsonsubmit three times, with a full, a short, and a minimal payload:The orchestrator left the worktree. The submit then passed. The test-reviewer brief (dispatch 1560) had
test_changes: null, because the new test file existed only in the worktree. The test-reviewer returned verdicterror, and the run endedimplementation_failedwith reasonverdict:error.Implementation 179 ran from inside the worktree. Agents wrote the JSON to a scratchpad file and ran
os-sdlc-subagent-stop < file. All 8 submits passed. The guard also refused a heredoc form (dispatch 1566);printfto a file passed.Reproduce
n/a: needs a live worktree session and the Claude Code shell guard; the evidence is implementations 178 and 179 of #1111.
Approach
Two parts. The decided part: agent definitions name the stdin-file submit as the one submit form. The open part: the brief root. A brief must come from the implementation's worktree, not from the session cwd, so a wrong cwd cannot produce an empty
test_changes. Decide the second part at takedown.Origin
os-sdlc-subagent-stop < file; the orchestrator re-entered the worktree and opened run 179verdict:error← test-reviewer brief hadtest_changes: null(dispatch 1560 handoff 1591) ← brief built from the main checkout (plugins/os-sdlc/lib/os_sdlc/dispatch/brief.rb:6,subagent_start.rb:30) ← orchestrator left the worktree (IMPROVISATION) ← shell guard refused--jsonsubmit (UPSTREAM-TOOL, Claude Code shell guard)VERDICT: CREATE
The worktree-root half of this ticket was not filed as a new ticket. The skeptic found it duplicates #1164. The evidence and both candidate designs are on #1164 as an occurrence comment.
Resolution
Done: Decided half: all 13 os-sdlc agent definitions name one submit form — write the handoff JSON to sdlc_handoff_<dispatch_id>.json in the scratchpad (fallback /tmp) and run os-sdlc-subagent-stop < file; --json, heredocs and $(...) are named as refused. Open half (briefs must come from the implementation's worktree) is the same fault as #1164; evidence and both takedown designs posted there.
Evidence: main
dd9379e0(c20002b5,b24c6374); full os-sdlc suite 2778 runs 0 failures; plugin cache refreshed by worktree finish.Follow-ups: #1164 holds the brief-root half; its takedown stopped at relevance needing a ruling on ADR-0055 (ruling goes to Jared).