Handoff stop refused by the worktree guard when its text contains git #854
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#854
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-isolated session, Claude Code refuses a Bash command when it cannot prove that the command does not run git. The check reacts to the word
gitanywhere in the command text, including inside a JSON argument.os-sdlc-subagent-stoptakes its handoff as JSON on the command line or on stdin. When the handoff text names a git command, the stop call is refused. Bash-only agents (behavior-verifier, suite-check) have no Write tool, so they cannot move the payload into a file.Observed
Implementation 16 (#852), behavior-verifier dispatch 128. The handoff item said "The git remote -v call is unchanged". Three forms were refused:
The call passed after the agent replaced "git remote -v" with "the remote-listing call".
Reproduce
Origin
/os-sdlc:implement 852, implementation 16, 2026-09-30.git← UPSTREAM-TOOL: Claude Code 2.1.285 worktree-isolation Bash check.VERDICT: CREATE
New evidence, 2026-10-02: the same refusal happened again.
Implementation 22 (#907), test-reviewer dispatch 193.
The handoff text quoted "git add exit 128".
The guard message, verbatim: "this command runs os-sdlc-subagent-stop with the text {"dispatch_id": 193, ...} in a plain command, so what it runs cannot be shown not to be git. Refusing to run it."
The agent retried with reworded text or file input, and the retry succeeded.
The refusal cost one extra orchestrator turn.
Prediction agents in the same session also hit the guard on compound and multi-line Bash commands.
This ticket also affects agents that have a Write tool, not only Bash-only agents.
A ticket about git behavior makes the problem likely, because its handoff text names git commands.
Guard source: the Claude Code worktree-isolation Bash check (upstream tool). No file under plugins/ holds the message text.
Session: 84a6f8a1-361d-47d8-8b1c-cd2e8f8dff33
Transcript: /home/jared/.claude/projects/-home-jared-dev-cc-os/84a6f8a1-361d-47d8-8b1c-cd2e8f8dff33.jsonl
Resolution
Done: Folded into #1096 as evidence
Evidence: Same mechanism; see occurrence comment on #1096
Follow-ups: none