You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
context: compaction — semantic recovery affordance after fold/stub #242
compaction: semantic recovery affordance after fold/stub
Parent: none — independent of #228 family (context organization, not task families)
Problem
After a compaction pass, folded assistant reasoning is replaced by a marker line and the stubbed tool results point at the store/journal. The model is never told it can query that journal. So the only recovery path is re-exploration via tools (re-grep, re-read) — wasteful, and lossy when the folded context held reasoning, not file content.
The transcript does still hold: user messages (never folded), the verbatim tail, and the state card. But the model has no affordance for "the folded context is grep-able at ".
Acceptance
The fold marker or the system prompt's session-facts section tells the model where the full record lives and that grep/read on it works (the session journal path is already journaled; the store thread for chatlog sessions too).
Cheapest correct form: extend the fold marker text (foldLocked's marker) to name the journal path, or add one line to system.md's session-facts ("folded context: grep the session journal at ").
Verification: a compaction pass fired; the resulting marker names a path; grep on that path returns folded content.
Where it lives
internal/session/loop.go — foldLocked marker composition; internal/session/sessionfile.go — appendCompaction. Keep it to the marker text change; do not add a new tool.
Drafted with CodeAF · reviewed and owned by the author
Activity
compaction: the fold marker names the journal path the model can grep
compaction: the fold marker names the journal path the model can grep
compaction: the fold marker names the journal path the model can grep
compaction: the fold marker names the journal path the model can grep
compaction: the fold marker names the journal path the model can grep
compaction: the fold marker names the journal path the model can grep (…