Session Persistence
Medium
- Category
- Rogue Agent
- Content
# Pattern: Externalize critical state before compaction risk def preserve_subagent_state(progress): """ Write state to files so it survives compaction. """ # Write to TodoWrite for task state todo_state = {- Confidence
- 80% confidence
- Finding
- Write state to file
