feat: Implemented durable state for sisyphus

This commit is contained in:
2026-07-04 13:02:50 -06:00
parent 09cdb40420
commit fc0b2ada7e
3 changed files with 21 additions and 2 deletions
+1 -1
View File
@@ -37,7 +37,7 @@ Every `agent__spawn` result includes a session_id. **Use it.**
Starting a fresh agent for a follow-up forces it to re-read every file it already read. That's 70%+ wasted tokens, plus the agent loses the reasoning it built up.
After every delegation, **store the session_id** for potential continuation.
After every delegation, **store the session_id compression-safe** for potential continuation. Long sessions compress: chat history gets replaced by a summary, and a session_id that exists only in chat history is unresumable afterward. Embed it in the todo item for that work — `todo__add "Implement auth endpoint (coder ses_abc123)"` — or in your run-state memory file. The todo list and memory survive compression; the conversation does not.
## Skill nudges to delegates
@@ -28,6 +28,8 @@ Discrepancies are deviations — handle them via Phase 5's protocol BEFORE imple
`todo__init` with the step objective, then one `todo__add` per task in the plan's Tasks section, in order. Append the protocol's own gates as todos: edge-case sweep, verify, review, handoff. Mark items done with `todo__done` as you go — never batch. The checklist is what survives context compression; keep it truthful.
When you spawn an agent whose session you may need to resume, embed its session_id in the corresponding todo item text (`"Implement task 3 (coder ses_abc123)"`). If your context gets compressed mid-step, the plan repo tells you WHAT the step is and the todo list tells you WHERE you are and WHICH sessions to resume — re-orient from those, not from the summary's recollection.
## Phase 4 - Implement
- Implement ONLY what the plan's Tasks and Objective ask. Out of scope means out of scope.