What
The orchestrator session's write confinement and bash block are off after a resume until the user re-runs /codecarto-open (semantic 4.2). codecartoModeActive starts false and is reset in session_start (extensions/codecarto/index.ts:388,444); the tool_call guard returns early while it is false (:461); only /codecarto-init (:617) and /codecarto-open (:504) set it. A resumed or reloaded Pi session that continues in a workspace has no guard. The phase sub-agent is protected independently by phaseCompactionExtension's guard, so this is defense-in-depth, not an escape.
Fix
Derive the mode from persisted state at session_start: a .codecarto/workflow/status.yaml plus an orchestrator pointer naming this session (.orchestrator.local.yaml) re-arms the guard without a command. Test: a harness session_start in an initialized workspace leaves the guard active.
Found by the 2026-09-15 self-audit (full-with-deep-audit on this repository at a159d6c, v0.25.0 + #353, ollama-cloud/deepseek-v4.1-flash); confirmed by reading before filing. Report and finding id in self-audit/2026-09-15-v0.25.0-full-with-deep-audit/REVIEW.md.
🤖 Generated with Claude Code
What
The orchestrator session's write confinement and bash block are off after a resume until the user re-runs
/codecarto-open(semantic 4.2).codecartoModeActivestartsfalseand is reset insession_start(extensions/codecarto/index.ts:388,444); thetool_callguard returns early while it is false (:461); only/codecarto-init(:617) and/codecarto-open(:504) set it. A resumed or reloaded Pi session that continues in a workspace has no guard. The phase sub-agent is protected independently byphaseCompactionExtension's guard, so this is defense-in-depth, not an escape.Fix
Derive the mode from persisted state at
session_start: a.codecarto/workflow/status.yamlplus an orchestrator pointer naming this session (.orchestrator.local.yaml) re-arms the guard without a command. Test: a harnesssession_startin an initialized workspace leaves the guard active.Found by the 2026-09-15 self-audit (
full-with-deep-auditon this repository ata159d6c, v0.25.0 + #353,ollama-cloud/deepseek-v4.1-flash); confirmed by reading before filing. Report and finding id inself-audit/2026-09-15-v0.25.0-full-with-deep-audit/REVIEW.md.🤖 Generated with Claude Code