Commit Graph

3 Commits

Author SHA1 Message Date
can1357 3006fe817b test(coding-agent): drop evaluator-worktree note from plan-reference test 2026-06-18 22:57:20 +02:00
can1357 0c69b35785 style: biome format integrated #2851/#1246/#2972 changes 2026-06-18 22:56:24 +02:00
can1357 dbf4b53163 fix(coding-agent): re-inject approved plan reference after compaction
After plan approval the executor delivers the plan-mode-reference exactly
once and sets `#planReferenceSent = true`. Both compaction paths — `compact()`
and `#runAutoCompaction()` — replace the conversation history that carried
that reference but never cleared the flag, so `#buildPlanReferenceMessage()`
short-circuited to null on every subsequent turn and the executor permanently
lost the plan it was working on (exactly the long-session failure reported).

Clear `#planReferenceSent` right after `replaceMessages()` in both paths so the
next turn re-reads the plan from disk and re-injects it. The reset is a no-op
for ordinary sessions: the default plan path (PLAN.md in session-local scratch)
has no file on disk, so `#buildPlanReferenceMessage()` still returns null there.

Adds a deterministic regression test (short-circuited compaction, mock stream)
that fails before this change and passes after, plus a guard proving normal
sessions get no spurious plan injection.

Fixes #1246
2026-06-18 22:52:29 +02:00