You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ssl.SSLCertVerificationError inherits from ValueError, so the inline local-validation guard treated TLS certificate failures as non-retryable request-shaping bugs. Those failures are provider transport errors and should stay on the normal retry/failover path.
Rebased this PR onto current origin/main (859e09b7). During conflict resolution I kept the extracted _is_local_validation_error() helper from this PR and folded in the newer main-branch json.JSONDecodeError exclusion, so the rebase does not regress the provider malformed-response retry behavior.
CI follow-up: the refreshed full test job is red with the same repo-wide baseline cluster seen on sibling PRs, not with failures in this TLS/local-validation change. The failures are concentrated in Discord fixture guild attributes, npm install vs ci expectations, PTY/web-server/tui_gateway drift, WSL clipboard detection, and tool-arg coercion. The targeted validation for this PR remains green (test_run_agent.py 308 passed and test_error_classifier.py 118 passed).
Thanks for the fix @sgaofen — the core change here landed on main independently before this PR could be merged.
Automated hermes-sweeper review.
The ssl.SSLError exclusion from is_local_validation_error is present at run_agent.py:11169-11176 via commit 4e27e498f1b438b2a380cd4be83dc37761fd1412 (fix(agent): exclude ssl.SSLError from is_local_validation_error to prevent non-retryable abort), which also closes ssl.SSLCertVerificationError misclassified as local validation error #14367.
The fix is not yet in a release tag (landed after v2026.4.23), but it is on main.
One thing worth noting: the landing commit did not include the three regression tests you authored (test_ssl_cert_verification_error_is_not_local_validation, etc.). If a maintainer wants to rescue the test additions from this PR, that +20-line patch to tests/run_agent/test_run_agent.py is still valuable coverage.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
comp/agentCore agent loop, run_agent.py, prompt builderP2Medium — degraded but workaround existstype/bugSomething isn't working
3 participants
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Root cause
ssl.SSLCertVerificationErrorinherits fromValueError, so the inline local-validation guard treated TLS certificate failures as non-retryable request-shaping bugs. Those failures are provider transport errors and should stay on the normal retry/failover path.Closes #14367.
Fix
_is_local_validation_error()helper for the request-shaping guard.ssl.SSLErrorfrom local-validation classification, which coversSSLCertVerificationErrorand related TLS transport failures.ValueError/TypeErrorstill are.Tests
uv run --frozen --python 3.11 --extra dev pytest -o addopts= tests/run_agent/test_run_agent.py::test_ssl_cert_verification_error_is_not_local_validation tests/run_agent/test_run_agent.py::test_request_shaping_errors_are_local_validation tests/run_agent/test_run_agent.py::test_unicode_encode_error_is_not_local_validation -q->4 passeduv run --frozen --python 3.11 --extra dev pytest -o addopts= tests/agent/test_error_classifier.py -q->111 passeduv run --frozen --python 3.11 --extra dev pytest -o addopts= tests/run_agent/test_run_agent.py -q->297 passedgit diff --check