Skip to content

Orchestrator write guard is off after a session resume until /codecarto-open #363

Description

@TheAmericanMaker

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingself-auditFiled from a CodeCartographer self-audit run

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions