Summary
With the claude-bridge provider, the automatic turn that gentle-shell starts when a background subagent finishes can fail in pi-claude-bridge with:
Error: prompt-capture: no capture for this 66034-char system prompt, and it embeds none of the 2 known.
Closest known match diverges at offset 66034 (68707-char key, last recorded at turn_start).
When that happens, the primary session's turn is lost. The model replied only "No response requested." and never processed the subagent result. The next turn, started by a user prompt, worked.
Reproduction (observed once)
- Primary session on
claude-bridge (claude-opus-5-5, Max plan).
- Launch
gentle-ai-explore with subagent_run in background mode.
- The primary turn ends and the session goes idle.
- The subagent finishes.
gentle-agents.ts delivers the result with pi.sendMessage(..., { deliverAs: "steer", triggerTurn: true }), which starts a new turn.
- The bridge throws the error above.
Why it may involve gentle-shell
The failing prompt is an exact prefix of the last recorded prompt: the divergence offset equals the failing prompt's length, and 2673 characters are missing from the end. Since #1485, gentle's harness blocks (orchestrator, todo, and others) are added by mutating systemPromptOptions.appendSystemPrompt in before_agent_start. The likely explanation is that the triggerTurn turn was rendered without those appended blocks. If so, then even without the bridge's throw, a background-completion turn would run without the gentle harness, the same silent-loss class as #1485.
I have not confirmed whether this comes from pi's triggerTurn path or from the append mechanism. I filed the bridge side here: elidickinson/pi-claude-bridge#144
Environment
- gentle-shell / gentle-pi 3.7.0 (git package, HEAD f14b19a)
- pi 0.87.1, pi-claude-bridge 0.9.0, gentle-engram 0.1.16, pi-mcp-adapter, pi-web-access
- Background subagent policy: on; Linux
Suggestion
Check that a background-subagent completion turn (triggerTurn while idle) receives the same appended harness as a user-prompted turn. It may be worth a regression test with the claude-bridge provider.
Related: #1485, elidickinson/pi-claude-bridge#144
Summary
With the
claude-bridgeprovider, the automatic turn that gentle-shell starts when a background subagent finishes can fail in pi-claude-bridge with:When that happens, the primary session's turn is lost. The model replied only "No response requested." and never processed the subagent result. The next turn, started by a user prompt, worked.
Reproduction (observed once)
claude-bridge(claude-opus-5-5, Max plan).gentle-ai-explorewithsubagent_runin background mode.gentle-agents.tsdelivers the result withpi.sendMessage(..., { deliverAs: "steer", triggerTurn: true }), which starts a new turn.Why it may involve gentle-shell
The failing prompt is an exact prefix of the last recorded prompt: the divergence offset equals the failing prompt's length, and 2673 characters are missing from the end. Since #1485, gentle's harness blocks (orchestrator, todo, and others) are added by mutating
systemPromptOptions.appendSystemPromptinbefore_agent_start. The likely explanation is that thetriggerTurnturn was rendered without those appended blocks. If so, then even without the bridge's throw, a background-completion turn would run without the gentle harness, the same silent-loss class as #1485.I have not confirmed whether this comes from pi's
triggerTurnpath or from the append mechanism. I filed the bridge side here: elidickinson/pi-claude-bridge#144Environment
Suggestion
Check that a background-subagent completion turn (
triggerTurnwhile idle) receives the same appended harness as a user-prompted turn. It may be worth a regression test with the claude-bridge provider.Related: #1485, elidickinson/pi-claude-bridge#144