set() on an idle agent appends plan/mode at once — no request boundary would arrive until the next prompt, so a queued intent used to hang as pending forever (the composer showed a dead pending target). A running agent keeps the boundary-flush path unchanged. set() now reports which branch ran (committed/queued/cancelled/noop); the /plan handler's copy follows the branch (idle: "Plan mode on/off", mid-turn: the next-step wording), and both commit paths share the header-delta narration. The invariant drops turn enclosure: plan/mode is a standalone whole-value event (the synthetic log-only turns removal already established the between-turns append shape). The fixture mirrors the idle commit.
plan/ — plan collaboration state
English | 中文
Plan mode is one logged, per-agent collaboration state. It is a single product package, not a generic mode registry or a capability-seam trio.
| Package | Role | ctx key |
|---|---|---|
plan-mode/ |
plan/mode vocabulary + fold, boundary-applied state, the plan:policy guidance section, /plan [message] entry and /plan off exit, and the model-facing exit_plan_mode review tool |
ctx.planMode |
The active state is a pure function of the session log, so resume and fork restore it without extra machinery. The deployment supplies plan instructions through Cordis config, while exit_plan_mode stays registered when planning is inactive to keep the request tool catalog stable. Interactive adapters use the plugin-owned /plan command; sandbox mode and approval policy remain independent enforcement settings. Design: plan-specific collaboration state.