Describe the bug
json.JSONDecodeError inherits from ValueError, but in run_agent.py the error classification treats ValueError as a local validation error (non-retryable). When a provider returns malformed JSON (transient parse failure), the agent fails immediately instead of retrying, causing unnecessary session failures on provider hiccups.
Steps to reproduce
- Use a provider that occasionally returns malformed JSON responses
- Observe that the agent fails immediately with no retry instead of retrying the request
Expected behavior
JSONDecodeError should be excluded from the local validation error classification and treated as a retryable transient error.
Environment
- Hermes Agent version: current main
- OS: any
Describe the bug
json.JSONDecodeErrorinherits fromValueError, but inrun_agent.pythe error classification treatsValueErroras a local validation error (non-retryable). When a provider returns malformed JSON (transient parse failure), the agent fails immediately instead of retrying, causing unnecessary session failures on provider hiccups.Steps to reproduce
Expected behavior
JSONDecodeErrorshould be excluded from the local validation error classification and treated as a retryable transient error.Environment