Repository navigation
feat: show the retry cause as details of the AIR retry warning - #755
Merged
nikita-ashihmin merged 2 commits intoNov 11, 2026
Merged
nikita-ashihmin merged 2 commits into
nikita-ashihmin merged 2 commits into
Conversation
A retry warning showed only "Reconnecting... N/5". Codex sends the cause of the retry in TurnError.additionalDetails, and the adapter dropped it. The retry warning now carries the trimmed additionalDetails as details. With null or blank additionalDetails, the failure has no details key. Each revision of a failure carries only its own details. Terminal failures and the legacy path do not change.
…ision Document that a retry warning carries the trimmed additionalDetails as details, and that a terminal failure carries no details. Assert the details for ACP v1 and v2. Assert that the terminal revision of the same incident has no details key. Remove unit tests that repeat the wire test and take the same code path.
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
When the Codex app-server reports an
errorwithwillRetry: true, codex-acp publishes an AIRsessionFailurewarning. The warning had only the title, such asReconnecting... 2/5. Codex puts the cause of the retry inTurnError.additionalDetails, for examplestream disconnected before completion: idle timeout waiting for websocket. codex-acp dropped it, so a user saw the same title for minutes and did not know why.Changes
recordRetryWarningpasses the trimmedadditionalDetailsasdetailsof the warning. Withnullor a blank value, the warning has nodetailskey.recordSessionFailuretakes an optionaldetails. Each revision builds the record again, so a later revision without a cause does not keep the old one.createErrorEventandhandleSessionScopedNotification.willRetry: false) still do not sendadditionalDetails. The earlier tests asserted that a retry warning also must not send it. This change removes that rule for retry warnings only. The legacy, non-typed path already sends the full error,additionalDetailsincluded.Why the cause is safe to send for a retry
PR #383 kept
additionalDetailsout of every typed failure. This PR changes that rule for retry warnings only. Terminal failures still send nodetails.additionalDetailsincluded.Tests
auth-error-events.test.ts: the cause is indetailsfor a retry of the current turn, of another turn, of an HTTP 429, and for a late retry after the turn. Nodetailskey fornulland for a blank value.typed-session-failure-wire.test.ts: the raw wire JSON for one id across 4 revisions. A new cause replaces the old one, and a revision without a cause has nodetails.npm run typecheck: clean.npm run test: 2507 passed. 2 tests instandard-subagent-live.test.tsfail. They fail onmainwithout this change too.