Compacting a forked session drops the step's own work from the summary #276
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What happens
When opencode (2.0.30) compacts a session that was forked from another step's, the compaction request carries the history the session was forked with and the step's brief, not the step's own turns since the fork. The summary the step goes on from leaves out what it did.
Seen in the
apply-singlesimulated run, where opencode is real: the build's turn requests carried 14, then 17 messages; the compaction request carried 14, the history at the fork. In a session of its own the compaction request carries every turn.Since #275,
thoroughforks its build session from the proposal, so every compaction during a build hits this. The worktree still holds the work, so the step can recover it, at a cost.Fix
Done when
A compacted build step's summary names the files it wrote and the tasks it ticked before the compaction.
Verified by the simulated run
apply-single, which drives real opencode. A carried (forked) step that crosses its context alarm now starts a fresh session ("Continued session full"), and compacts in place only at the second alarm. Production runs this size stay far below the alarm (run 136's largest step peaked at 89,828 of 240k), so it won't come up on its own.