Qwen autofix now retries model API errors instead of stranding managed PRs
wenshao · ghdev · 2026-07-20
What this PR fixes
This PR prevents a model API error from stranding a managed PR in the qwen autofix workflow.
Root cause
When the agent subprocess died on a model-side API error — such as 403 access denied, 429 quota, or 5xx — the failure was treated as if the agent had already evaluated the feedback. run-agent.mjs wrote failure.md and handoff.md, which advanced the feedback watermark. The next scan then saw no new work and never retried, leaving the PR stranded.
New behavior
- run-agent.mjs extracts [API Error: 4xx/5xx] from the output tail and records it in failure.md.
- It also drops an agent-api-error marker file.
- The handoff step detects that marker and routes the failure into the retry/sentinel path instead of advancing the watermark.
- The retry loop still increments rounds, so repeated failures remain bounded by MAXROUNDS.
- Real evaluated handoffs still advance normally; pre-verdict crashes and timeouts keep their existing behavior.
Why it matters
This turns a transient model access or quota failure into a retriable condition instead of silently marooning the PR until a human manually re-arms it.
More from coding & agent
- Devin Fusion debuts on Coding Agent Index, keeps frontier performance at lower cost — daniel_mac8 · 2026-09-12
- Stress-Testing an AI Gateway With 100 Concurrent Agents: All HTTP 200, Continuity Collapsed — its_vayishu · 2026-09-12
- Blender MCP hands-on: impressive engineering, but outputs need a full remodel — Intelligent_Prize532 · 2026-09-12
- Managing an army of Claude-built agents: memory, tools, and harnesses — Trokkan · 2026-09-12
- DeepSeek 4.1 Flash wired into Claude Code: open-source model runs agent workflows — jasonkneen · 2026-09-12
- Dev builds a fictional Hinge-style dating app for a simulated fly, dopamine activity drives swipe decisions — w1kke · 2026-09-12