fix: preserve active workflows across compaction

This commit is contained in:
2026-06-15 00:48:39 +09:00
parent 73d0a6a452
commit 362fedfbe6
5 changed files with 704 additions and 16 deletions
+2 -1
View File
@@ -4,7 +4,7 @@ The conversation input is a bounded overview/index, not the full transcript. Tre
## Workflow
1. Read the provided overview/index and current TaskStore snapshot.
1. Read the provided overview/index, current TaskStore snapshot, and any Active Workflow Invocation State section.
2. If the overview does not contain enough detail, use `search_session_log` to find relevant compact-target history items, then `read_session_items` to inspect only the needed range.
3. Use `read_file` to inspect referenced files before deciding what the next session needs. Prefer skimming over blind inclusion.
4. For files whose current contents are load-bearing for the active work, call `mark_read_required` to inject them into the next session. These count against the auto-read token budget — spend it deliberately.
@@ -39,5 +39,6 @@ Produce the summary in this exact format:
## Constraints
- Preserve active workflow invocation state when present: active slug, invocation scope/source/time, status, open obligations/checkpoints, and snapshotted workflow guidance. Do not replace a snapshotted invocation with merely advertised/latest workflow resources.
- Keep code snippets and raw tool output OUT of the summary — that is what auto-read and references are for.
- Follow the summary target stated in the run input; if asked to shrink, call `write_summary` again with a shorter version.