fix(plan-mode): deliver approval as follow-up after compact approval #66

Merged
lucas merged 1 commit from agent/issue-38-compact-approval into main 2026-10-26 12:14:00 +01:00
Collaborator

Closes: #38

  • PlanModeSessionSurface.compact now accepts { suppressContinuation }.
  • New #compactForExecution helper compacts with suppressContinuation: true (best-effort, logs on failure); used by both the live and detached approve paths.
  • Live compact path queues the approval text as a non-awaited synthetic followUp prompt after compaction; the tool result still carries the approval. keep mode is unchanged.
  • Tests: compact options, compact→prompt ordering, extra instructions, compaction-failure case, detached suppressContinuation.

Verified: bun test src/bridge/plan-mode-bridge.test.ts (24 pass), tsc --noEmit clean. Manual UI check from the issue not performed (unattended session). If it shows a duplicate execute instruction (meaning compaction didn't abort the turn), apply the fallback from the issue's contingency section.

Closes: #38 - `PlanModeSessionSurface.compact` now accepts `{ suppressContinuation }`. - New `#compactForExecution` helper compacts with `suppressContinuation: true` (best-effort, logs on failure); used by both the live and detached approve paths. - Live compact path queues the approval text as a non-awaited synthetic `followUp` prompt after compaction; the tool result still carries the approval. `keep` mode is unchanged. - Tests: compact options, compact→prompt ordering, extra instructions, compaction-failure case, detached `suppressContinuation`. Verified: `bun test src/bridge/plan-mode-bridge.test.ts` (24 pass), `tsc --noEmit` clean. Manual UI check from the issue not performed (unattended session). If it shows a duplicate execute instruction (meaning compaction didn't abort the turn), apply the fallback from the issue's contingency section.
Manual compaction aborts the in-flight propose turn, so the approval tool
result never reached the model and the SDK resumed with a generic nudge.
Compact with suppressContinuation and queue the approval text as a
synthetic follow-up prompt in both live and detached paths.

Co-Authored-By: Claude Opus 5.5 via omp-deck
lucas approved these changes 2026-10-26 12:13:54 +01:00
lucas merged commit d9146121c3 into main 2026-10-26 12:14:00 +01:00
lucas deleted branch agent/issue-38-compact-approval 2026-10-26 12:14:01 +01:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
lucas/omp-deck!66
No description provided.