fix(tasks): don't let a context compaction block the merge click or mislead the board
Pre-prompt auto-compaction runs on every round that RESUMES a session (retry, follow-up and merge), and on a full context window that is minutes of work. Three things went wrong while it ran: - The merge command awaited the whole launch inline while holding the folder's git lock, so the dialog sat open through the compaction and the round's prompt. It now waits only until the generation is live (a fire-once dispatch signal), runs the launch off-thread with the claim transferred to it, and releases the folder lock at the CAS. - Resumed rounds published their live connection only after compacting, and a `preparing` row still named the previous generation's dead connection, so the session viewer showed a finished transcript for the whole wait. Coordinates are now published before compacting, `begin_setup` clears the stale connection, and `preparing` counts as live in the viewer — which also makes permission prompts raised mid-compaction answerable. - `latest_progress` was task-scoped, so a merging card narrated the previous work round. Progress and compaction events now carry `run_seq` and are read back per generation, with a derived `compacting` flag so the board can say what a multi-minute `preparing`/`merging` is doing, and the engine's `/compact` turn gets its own phase divider in the transcript. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
X
xintaofei committed
bb952802b333a13b9899da6a461a0e498d0c366a
Parent: b2eec98