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.
EugeneTheDev
pushed a commit
that referenced
this pull request
Nov 16, 2026
🤖 I have created a release *beep* *boop* --- ## [2.7.0](v2.6.0...v2.7.0) (2026-11-16) ### Features * report delegated tasks as session messages and reference children from tool calls ([#760](#760)) ([6567651](6567651)) * send structured plans as items plan_update when the client supports it ([#752](#752)) ([ab7a968](ab7a968)) * show the retry cause as details of the AIR retry warning ([#755](#755)) ([e981b3c](e981b3c)) ### Bug Fixes * Map priority mode to fast ([#327](#327)) ([52cc518](52cc518)) * report hooks that block or stop Codex ([#767](#767)) ([bcf0e92](bcf0e92)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: acp-release-bot[bot] <246668977+acp-release-bot[bot]@users.noreply.github.com>
mrmans0n
added a commit
to mrmans0n/codex-acp
that referenced
this pull request
Nov 17, 2026
Upstream v2.7.0 (agentclientprotocol#767) replaces the event handler's session failure epoch and per-handler notice counter with SessionFailureIds, one counter per connection that every prompt's handler shares, and passes it as the fourth constructor argument. 8aaab39 conflicted there: it kept the epoch string and numbered client-neutral incidents with the incident counter of its connection-wide NeutralSessionFailureLedger. Upstream's counter now does exactly that for both typed forms, with the same <epoch>:<n> id format, so the adaptation: - takes upstream's SessionFailureIds next to the format (the boolean AIR flag of upstream's own callers still means air or none); - allocates failure and notice ids from it in both forms and drops the ledger's now unused incident counter; - keeps the ledger's revision floor for the neutral form, which upstream does not have (a later handler can still re-send <turnId>:error); - passes this.capabilities.sessionFailureFormat and this.sessionFailureIds from the server, including the pre-prompt goal subscription. With agentclientprotocol#755 the retry warning carries the trimmed Codex additionalDetails as details; the neutral record follows the AIR lane's title and details rules, as docs/air-extensions.md already states, so the neutral retry test now expects them. With agentclientprotocol#767 a hook that blocks or stops Codex is a notice: a neutral client without session.notices gets it as a _meta.sessionFailure record with kind notice. New test for that; it and the existing neutral tests fail when the typed lane is AIR-only, and the later-prompt id test fails with per-handler ids. Adapted from 8aaab39 (originally 2a1384e).
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.