Coalesce consecutive tool-failure recovery audits into one count - #886
Closed
TheGreatAxios wants to merge 5 commits into
Closed
Coalesce consecutive tool-failure recovery audits into one count#886TheGreatAxios wants to merge 5 commits into
TheGreatAxios wants to merge 5 commits into
Conversation
TheGreatAxios
force-pushed
the
cl-7642-detect-verbatim-tool-markup
branch
from
September 11, 2026 01:04
4a695dc to
3e213d3
Compare
TheGreatAxios
commented
Sep 11, 2026
TheGreatAxios
left a comment
Collaborator
Author
There was a problem hiding this comment.
Review · Request changes
Unique coalesce patch arms once and writes one JSONL line when the recovery infer is issued. Do not merge until this is rebased onto current 885 (3e213d30).
Findings
- Three-dot still contains stale parent
4a695dce. Current 885 is3e213d30(docs + extra tests).nudge-director.test.tsconflicts on merge-tree. src/subagent/nudge-director.ts:405-410— deferred flush only inapplyPendingNudgeafter an infer is present. Cancel/destroy or compact-without-infer drops audits that used to log at arm time.- Tests only cover fail+fail+ok → count 2. No single-failure or all-fail batch.
Notes
GitHub blocks request-changes on own PRs, so this is a comment with that verdict.
TheGreatAxios
commented
Sep 11, 2026
TheGreatAxios
left a comment
Collaborator
Author
There was a problem hiding this comment.
Critic · Request changes
16a5570f is the unique commit. Stack still carries old 885 tip.
Findings
- Merge-base with current
origin/cl-7642is57226a72, not 885 HEAD. - Flush only after infer (
nudge-director.ts:502-514); compact return at:414-419skips apply. intervention-log.tsdocs say omitcountfor one; writer always writescountwhen counter > 0.
TheGreatAxios
force-pushed
the
cl-7648-coalesce-tool-failure-interventions
branch
from
September 11, 2026 02:24
16a5570 to
ff61185
Compare
TheGreatAxios
force-pushed
the
cl-7642-detect-verbatim-tool-markup
branch
from
September 11, 2026 03:11
cdb3776 to
d172cd8
Compare
Models sometimes emit <tool_call><function=...> wrappers as assistant text instead of real tool_call blocks. Catch that narrow shape, give one corrective nudge per no-real-tool epoch without counting it as incomplete-report narration, then fall through to the existing report policy. Thinking blocks and arbitrary XML stay out of scope; the epoch resets only on genuine tool activity or a parent follow-up.
Document recovery of verbatim tool markup in fleet stop policy.
Several failed tool.done events before the pending recovery nudge is consumed were each writing a separate intervention line. Keep the recovery nudge text and arming behavior the same, but count the burst in director memory and flush a single record with count when the nudge is applied. Forensics treats missing count as one.
TheGreatAxios
force-pushed
the
cl-7648-coalesce-tool-failure-interventions
branch
from
September 11, 2026 03:11
ff61185 to
5e0241a
Compare
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.
Summary
Verification
bun run checkblocked by known pre-existing main failuresFixes CL-7648