Document stderr regex branch unreachability and add turn.failed fixture-driven tests#4122
Merged
Trecek merged 2 commits intoJun 27, 2026
Conversation
…ssification The stderr regex branch (_CODEX_CONTEXT_EXHAUSTION_PATTERN.search) is unreachable for Codex because turn.failed events arrive via stdout NDJSON and are handled by _adapt_agent_result. This branch is a non-Codex fallback path only.
- Replace empty error_message with realistic non-matching message in test_turn_failed_error_code_only_classify_returns_context_exhausted - Change `!= CONTEXT_EXHAUSTED` to `== API_ERROR` in test_turn_failed_non_exhaustion_error_code_not_context_exhausted - Change `!= CONTEXT_EXHAUSTED` to `== COMPLETED` in test_stderr_non_exhaustion_not_context_exhausted Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Add a clarifying comment in
_exit_classification.pydocumenting that the stderr regex branch (_CODEX_CONTEXT_EXHAUSTION_PATTERN.search(result.stderr)) is unreachable for Codex becauseturn.failedevents arrive via stdout NDJSON, not stderr. Extend the_turn_failed_ndjsontest helper with an optionalerror_codekwarg and add five new test methods exercising allerror.code/error.messagevariants ofturn.failedclassification plus a stderr boundary test.Implementation Plan
Plan file:
/home/talon/projects/autoskillit-runs/impl-20260627-014523-646887/.autoskillit/temp/make-plan/t5_p6_a14_wp1_stderr_regex_unreachable_plan_2026-06-27_015000.mdCloses #4050
🤖 Generated with Claude Code via AutoSkillit
Token Usage Summary
* Step used a non-Anthropic provider; caching behavior may differ.
Token Efficiency
Model Usage Breakdown