镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

feat: show the retry cause as details of the AIR retry warning - #755

Merged
nikita-ashihmin merged 2 commits into
agentclientprotocol:mainfrom
nikita-ashihmin:feat/retry-warning-details
Nov 11, 2026
Merged

nikita-ashihmin merged 2 commits into
agentclientprotocol:mainfrom
nikita-ashihmin:feat/retry-warning-details

Conversation

@nikita-ashihmin

@nikita-ashihmin nikita-ashihmin commented Nov 11, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

When the Codex app-server reports an error with willRetry: true, codex-acp publishes an AIR sessionFailure warning. The warning had only the title, such as Reconnecting... 2/5. Codex puts the cause of the retry in TurnError.additionalDetails, for example stream 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

  • recordRetryWarning passes the trimmed additionalDetails as details of the warning. With null or a blank value, the warning has no details key.
  • recordSessionFailure takes an optional details. Each revision builds the record again, so a later revision without a cause does not keep the old one.
  • Both paths of a retry warning use it: createErrorEvent and handleSessionScopedNotification.
  • The title, the actions, the id and the revision do not change.
  • Terminal failures (willRetry: false) still do not send additionalDetails. 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, additionalDetails included.

Why the cause is safe to send for a retry

PR #383 kept additionalDetails out of every typed failure. This PR changes that rule for retry warnings only. Terminal failures still send no details.

  • The cause goes to the same user whose Codex session retries. A user who uses Codex directly sees the same text.
  • The legacy, non-typed path already sends the full error to every other client, additionalDetails included.
  • For an HTTP retry, the text can hold the response body, the provider URL and a request id. These belong to the user's own account and gateway. They help the user see why the turn waits.

Tests

  • auth-error-events.test.ts: the cause is in details for a retry of the current turn, of another turn, of an HTTP 429, and for a late retry after the turn. No details key for null and 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 no details.
  • npm run typecheck: clean.
  • npm run test: 2507 passed. 2 tests in standard-subagent-live.test.ts fail. They fail on main without this change too.

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.
@nikita-ashihmin nikita-ashihmin changed the title feat: show the retry cause as details of the Air retry warning feat: show the retry cause as details of the AIR retry warning Nov 11, 2026
…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.
@nikita-ashihmin
nikita-ashihmin merged commit e981b3c into agentclientprotocol:main Nov 11, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant