Skip to content

Stop ending the run on a policy threshold (dirge-qobx.3, dirge-qobx.5) - #842

Merged
yogthos merged 1 commit into
mainfrom
fix/qobx-3-no-halt
Sep 2, 2026
Merged

Stop ending the run on a policy threshold (dirge-qobx.3, dirge-qobx.5)#842
yogthos merged 1 commit into
mainfrom
fix/qobx-3-no-halt

Conversation

@yogthos

@yogthos yogthos commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator

Stacked on #840 (the estimator + fixed-overhead work it reads).

The force-summary tier asked the fold for room and read the answer as matches!(outcome, Succeeded(_))did the summarizer replace a slice — so a prune-only pass that freed real tokens and brought the next request back under the threshold reported no room, and the run ended mid-task with the budget no longer full. That is what a live run did, one turn after printing context compacted: 63800 → 63479 tokens, at 204,320 of a 250,000-token budget.

  • made_room is now a question about the next request: what the estimator makes of the messages the fold left, plus the fixed overhead that is not in them, against the same threshold the decision used.
  • When the overhead alone clears that threshold, no fold can ever help (it rewrites messages; the overhead is not in messages). That state warns once — naming the two knobs that exist, the tool surface and context_target — stops spending summarizer calls on it, and lets the run continue while requests still fit the window. Stopping is reserved for the case where the unfoldable part fills the whole window, because then nothing fits; a_force_ended_turn_ends_the_run_when_nothing_can_be_folded still covers that.

Also dirge-qobx.5: the stop notice said "over the model's window", which is false in exactly the case it fires — the run was over dirge's own 80% budget threshold with the rest of the window unused — and then guessed at a cause that is now measured. It says which of the two states it is. And a fold that skips summarization for want of a compress window logged nothing, leaving a healthy-looking ContextCompacted with a tiny delta as the only evidence; that was the hardest part of diagnosing this.

New tests: a prune-only fold that clears the threshold continues the run; unfoldable overhead under the window warns exactly once, spends no summarizer call, and carries on.

The force-summary tier asked the fold for room and read the answer as
matches!(outcome, Succeeded(_)) — did the summarizer replace a slice —
so a prune-only pass that freed real tokens and brought the next
request back under the threshold reported no room and ended the RUN,
mid-task, with the budget no longer full.

made_room is now a question about the next request: the estimator's
account of the messages the fold left, plus the fixed overhead that is
not in them, against the same threshold the decision used.

And when the overhead alone clears that threshold, no fold can ever
help — it rewrites messages and the overhead is not in messages. That
state now warns once (naming the tool surface and context_target),
skips further summarizer calls, and lets the run continue as long as
requests still fit the window. Stopping is reserved for the case where
the unfoldable part fills the window, because then nothing fits.

Also dirge-qobx.5: the stop notice said 'over the model's window',
false in exactly the case it fired, and guessed at a cause that is now
measured; it says which of the two states it is. An empty compress
window — the usual reason a fold degrades to prune-only — logged
nothing at all, leaving a healthy-looking ContextCompacted with a tiny
delta as the only evidence.
@yogthos
yogthos merged commit 7cce3ee into main Sep 2, 2026
15 checks passed
@yogthos
yogthos deleted the fix/qobx-3-no-halt branch September 2, 2026 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant