fix(agent): bound multimodal outer-loop retries - #66510
Conversation
Re-triage correction: the recut no longer changes typed-content coercion or adds a three-strike circuit breaker. It extracts the existing traceback local-processing classifier into a testable helper and adds focused coverage. Related to merged #66567 and open broader lifecycle work #67411; a maintainer should consolidate the remaining test/refactor scope. |
teknium1
left a comment
There was a problem hiding this comment.
Thanks for isolating the retry-budget failure mode. The member comment correctly links this work to #66267.
Problems
- Current main already fixes the reported list-to-regex crash at the shared choke point:
agent/agent_runtime_helpers.py:675-707coerces list/dict content before regex processing and explicitly covers_interim_assistant_visible_text;tests/run_agent/test_run_agent.py:448-480covers the regression (commit296494db0). Therun_agent.pyhunk is therefore redundant. - The proposed three-strike key at
agent/conversation_loop.py:5616is only exception type/message. It does not establish that a matching error is local processing, although the terminal response labels it an internal error.
Suggested changes
- If this is salvaged, retain only the independently useful retry-policy change and remove the now-duplicated typed-content hunk/tests.
- Scope the cap to a verified deterministic local-processing class, or add coverage for the intended behavior across repeated outer-handler failures.
Automated hermes-sweeper review.
c8f9dfb to
e460f71
Compare
|
Resolved in e460f71. I recut the branch onto current upstream main (614dc19), removed the redundant run_agent.py/test_run_agent.py typed-content changes, and dropped the old type/message three-strike fingerprint. The remaining diff extracts current main's traceback-module classifier into a testable helper and adds focused production-loop coverage proving: allowlisted local-only tracebacks stop after one provider response; API/shared-module tracebacks and same-type/message nonlocal failures stay on the normal bounded retry path. Verification:
|
|
The recut at e460f71 is ready for upstream re-review. GitHub reviewer-request mutation is unavailable to this fork author/token, so this comment is the review request receipt. |
|
I re-reviewed the recut at The main question now is consolidation. #67411 retains the traceback classifier only as pre-terminal defense-in-depth and replaces traceback guessing with an attempt-scoped provider lifecycle after a terminal response. To avoid maintaining two competing retry-policy PRs, I suggest either:
If these integration tests are retained, one additional invariant is worth asserting: the terminal local-error path must not persist adjacent assistant messages, leave unanswered tool calls, or echo raw exception strings into the user-visible response/session. I posted the concrete locations and test suggestions on #67411 here: #67411 (comment) So: the recut addresses the previous review correctly; my recommendation is consolidation rather than another parallel retry policy. |
a24680f to
09b1f55
Compare
|
Rebased the focused salvage onto current upstream This keeps the earlier review repair intact: the redundant typed-content change and type/message fingerprint remain removed; the remaining production seam classifies only allowlisted local-processing tracebacks without API-call frames, with repeated nonlocal failures retaining the normal bounded retry path. Verified on the pushed head:
The PR remains open and unmerged; this exact head is ready for upstream re-review. |
|
Upstream re-review requested for exact head |
|
Upstream re-review requested for exact head The actionable findings from review Fresh verification on this exact head:
@teknium1 please re-review the current exact head when convenient. |
|
Upstream re-review requested for exact head This focused follow-up keeps the local-processing diagnostic in logs while preventing raw exception details from entering the user-visible response, turn-exit metadata, or synthetic tool-result session rows. The regression test now also asserts a generic terminal response and strict user/assistant role alternation. Fresh verification on this exact commit:
The requested-reviewers endpoint remains unavailable to this fork-author token (HTTP 404), so this comment is the exact-head re-review request receipt. @teknium1 please re-review when convenient. |
e83e96c to
c2ea66b
Compare
|
Upstream re-review requested for exact head Rebased the focused salvage onto current upstream Fresh verification on this exact head:
The pre-rebase head is preserved at |
SummaryTwo open PRs address repeated provider requests after local response-processing failures at different scopes: #66510 provides a focused traceback-based local-error classifier, while #67411 introduces an attempt-scoped provider-terminal lifecycle across multiple transports. The former stops allowlisted local failures without changing provider-shaped content; the latter prevents post-terminal retry, fallback, and continuation while hardening transcript finalization and error surfaces. Related pull requests
Duplicates#66510 and #67411 overlap on stopping retries after local response-processing failures, but are not exact duplicates: #66510 isolates the traceback fallback, whereas #67411 establishes the broader attempt-scoped lifecycle boundary and retains traceback classification as defense in depth. Suggested consolidationKeep #67411 open with a salvage path centered on the attempt-scoped lifecycle token, transport terminal markers, stale-worker isolation, and role-safe generic failure finalization. Keep #66510 open only for its focused classifier extraction and local-versus-nonlocal traceback tests; if #67411 absorbs that remaining scope, close #66510 as a duplicate of #67411, otherwise retain only the non-overlapping fallback-classifier work and fix its remaining CLI exception-detail exposure. Cross-PR triage: Reviewed 2 pull requests and 0 issues in this complex. Each diff was read against this issue; Assessment working set: 155 kB of PR diffs, 9 kB of issue/PR text, 12 kB of discussion (16 comments), 0 verify verdicts. verdicts reflect diff content, not PR titles. Part of an automated triage batch. |
|
Superseded by the broader attempt-scoped provider lifecycle in #67411, not rejected. The remaining useful scope from this PR — local-vs-nonlocal traceback classification, bounded fallback behavior, role-safe terminal persistence, and generic user-visible error surfaces — is already represented in #67411 and its focused lifecycle/classifier coverage. Keeping both open would maintain competing retry-policy paths. Closing this narrower PR so future work follows the authoritative #67411 exact-head lane. |
Problem
A Codex/vision worker can preserve assistant
contentas OpenAI-style typed parts. During incomplete-response deduplication,_interim_assistant_visible_text()passed that list to_strip_think_blocks()/re.sub, raising: