Fold an autonomous stretch with no user turn (dirge-qobx.4) - #843
Merged
Conversation
yogthos
force-pushed
the
fix/qobx-4-window
branch
7 times, most recently
from
September 2, 2026 15:03
0a7d16c to
6d7c90c
Compare
compute_compress_window snapped both cuts to a user message (dirge-89fm) so no tool_use/tool_result pair could be split. But one prompt and a hundred tool iterations has no user turn: snap_forward_to_user walked the head cut to messages.len(), the window collapsed to (0, 0), the summarizer never ran, and every fold in the stretch degraded to prune-only. apply_checkpoint_summary refused for the same reason, so the background-checkpoint fast path could not fire there either. A user turn is sufficient, not necessary. Results follow their call immediately (heal::fix_tool_call_pairing repairs a transcript where they do not), so any index whose message is not itself a tool result is a safe cut: the kept tail cannot begin with an orphan, and the message before the cut cannot hold calls whose results were dropped, because those results would be at the cut. The user boundary stays the preferred cut, so every transcript that folded before folds the same way; the fallback only runs where the old code returned nothing at all.
yogthos
force-pushed
the
fix/qobx-4-window
branch
from
September 2, 2026 15:11
6d7c90c to
7c486f7
Compare
yogthos
pushed a commit
that referenced
this pull request
Sep 2, 2026
dirge-qobx and children .1-.6, all closed by #840-#843. Plus dirge-57hu: CI runs nextest with no timeout, so the looping test those PRs surfaced held ten runners for 5h29m instead of failing. Also gitignores .beads/.auto-import-issues.jsonl, a per-machine staging marker that has been showing up untracked.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #842.
compute_compress_windowsnapped both cuts to a user message (dirge-89fm) so notool_use↔tool_resultpair could be split. But one prompt and a hundred tool iterations — the normal shape of agentic work — has no user turn in it:snap_forward_to_userwalked the head cut tomessages.len(), the window collapsed to(0, 0), the summarizer never ran, and every fold in that stretch degraded to prune-only.apply_checkpoint_summaryrefused for the same reason, so the background-checkpoint fast path could not fire there either.A user turn is sufficient, not necessary. Results follow their call immediately (
heal::fix_tool_call_pairingrepairs a transcript where they do not), so any index whose message is not itself a tool result is a safe cut: the kept tail cannot begin with an orphan, and the message before the cut cannot be holding calls whose results were dropped — those results would be at the cut.The user boundary stays the preferred cut, so every transcript that folded before folds identically; the fallback only runs where the old code returned nothing at all. A stretch where every candidate cut is a tool result is still refused.