Skip to content

fix(agent): retry provider JSON decode failures#14293

Closed
LeonSGP43 wants to merge 1 commit into
NousResearch:mainfrom
LeonSGP43:fix/jsondecodeerror-retry-14271
Closed

fix(agent): retry provider JSON decode failures#14293
LeonSGP43 wants to merge 1 commit into
NousResearch:mainfrom
LeonSGP43:fix/jsondecodeerror-retry-14271

Conversation

@LeonSGP43

Copy link
Copy Markdown
Contributor

Summary

  • stop treating provider-side JSONDecodeError exceptions as local validation failures
  • keep JSON decode failures on the normal retry path instead of aborting immediately
  • add a regression test that verifies a JSON decode failure can recover on retry

Testing

  • python3 -m pytest -o addopts='' tests/run_agent/test_anthropic_error_handling.py

Fixes #14271

@LeonSGP43 LeonSGP43 force-pushed the fix/jsondecodeerror-retry-14271 branch from c954c15 to a2f2f46 Compare April 24, 2026 17:22
@teknium1

Copy link
Copy Markdown
Contributor

Thanks for the contribution @LeonSGP43 — the fix you proposed has already landed on main via a parallel track.

Automated hermes-sweeper review found this implemented:

Closing as implemented. The linked issue #14271 can be closed as well.

@teknium1 teknium1 closed this Apr 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/agent Core agent loop, run_agent.py, prompt builder P1 High — major feature broken, no workaround type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

JSONDecodeError misclassified as local validation error causes non-retryable abort (HTTP None)

3 participants