address mara: drop CompactionMode, always checkpoint-then-compact

This commit is contained in:
damocles 2026-06-29 19:35:29 +02:00 committed by mara
commit c7bac398b2
4 changed files with 17 additions and 89 deletions

View file

@ -517,12 +517,10 @@ ttl_seconds?, to?)`, `answer(id, answer)`.
explicit `from: "graceful-stop"` message instead of an empty inbox.
This unmissably directs the agent to flush durable state (`/state`
files) and end the turn — the container exits when the turn completes.
This is a **single** wake: the graceful-stop turn *is* the checkpoint
(its prompt carries the full notes/CLAUDE.md/TODO.md flush guidance),
so the harness compacts directly afterwards if the context crossed the
watermark (`CompactionMode::CompactOnly`) rather than waking a second
dedicated checkpoint turn. Compacting before shutdown keeps a later
cold start cheap instead of re-uploading a huge transcript.
The graceful-stop turn takes the same post-turn compaction path as any
other turn: if the context crossed the watermark the harness runs a
notes-checkpoint turn and then `/compact`. Compacting before shutdown
keeps a later cold start cheap instead of re-uploading a huge transcript.
- `ask` — surface a structured question to the operator (default) or
a peer agent (`to: "<agent>"`). Non-blocking — returns a question
id; the answer arrives as a `question_answered` system event in the