# Conflicts: # .agents/notes/implemented/feature/2026-07-07-plan-mode.md # .agents/notes/implemented/simplification/2026-07-04-fold-stdio-ui-helper.md # docs/capability-seams.md # docs/config-catalog.md # docs/event-producer-consumer.md # examples/acp-agent/tests/plan-mode.e2e.ts # examples/acp-agent/tests/snapshots/plan-mode/tool-schemas.expected.json # examples/plan-acp-agent/README.md # examples/plan-acp-agent/cordis.yml # examples/plan-acp-agent/tests/acp.snapshot.ts # scripts/gen-doc-graphs.ts
mode/ — session-mode policy family
Session modes: named, logged, per-agent collaboration states, with plan mode as the first shipped definition. A single product package — there is no interface/implementation seam here, because a mode's variable part is a config value (the section text), not a swappable implementation.
| Package | Role | ctx key |
|---|---|---|
mode/ |
mode/set vocabulary + fold, the ctx.modes service (list/get/set with the turn-boundary flush), the mode:policy guidance section, and the model-facing exit_plan_mode review tool |
ctx.modes |
The mode in force is a pure function of the session log (SessionEventMap['mode/set'], last one wins), so resume and fork restore it with no extra machinery. The deployment supplies the plan instructions through Cordis config, while the model-facing exit_plan_mode schema remains registered in every mode to keep the request tool catalog stable. UIs read flips off session/event; the ACP bridge maps the vocabulary to the session-mode picker. Design: plan-mode Agent Note.