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
- NVIDIA says Nemotron 3 Ultra hit 97.1% on agentic RTL chip-design tasks — NVIDIAAI · 2026-07-27
- Tokyo Agent Forge hackathon shipped production-ready AI agents in one day — DavidBennett__ · 2026-07-27
- Long-running agents will need immutable event logs, this thread argues — sebpaquet · 2026-07-27
- Agentic Data Science in Practice: Agents Write Code but Answer Wrong Questions — hugobowne · 2026-07-27
- A VS Code extension adds Markdown-style highlighting to Alchemy string templates — samgoodwin89 · 2026-07-27
- Claude’s Stripe MCP connector is being called unusable after repeated disconnects — evielync · 2026-07-27