Files
deepseek-harness/packages/plan/plan-mode/src
_Kerman 4284530c7e fix(plan-mode): flush pending mode only at the in-turn agent/step seam
Prompt admission runs before any turn opens, so the agent/prompt-submit
flush listener could only ever append plan/mode outside an open turn —
invariant-vetoed and retried at agent/step when the session invariant is
mounted, silently out-of-turn in the durable log when it is not. agent/step
fires inside the open turn before every request derivation (including
turn 1 step 1), so it is the sole flush point and no behavior is lost: a
pending idle switch lands as the first step's in-turn plan/mode. Tests pin
the new contract: admission never appends; the first step boundary flushes.
2026-07-26 11:47:39 +08:00
..