Skip to content
Source
Sign inSign up
pingdotgg/t3code

Treat retryable Codex error notifications as runtime warnings #758

Mergedjuliusmarmingemerged 1 commit intomain fromrefs/pull/758/headmerged by juliusmarminge View on GitHub

juliusmarmingecommented

Summary

  • Map Codex error notifications with willRetry: true to runtime.warning instead of runtime.error.
  • Keep non-retryable errors mapped to runtime.error with class: provider_error unchanged.
  • Add adapter coverage to verify retryable error notifications emit runtime.warning with the expected turn/message.
  • Add ingestion coverage to ensure an active session remains running (with active turn preserved and no lastError) when runtime.warning is received.

Testing

  • Added test: apps/server/src/provider/Layers/CodexAdapter.test.ts (maps retryable Codex error notifications to runtime.warning).
  • Added test: apps/server/src/orchestration/Layers/ProviderRuntimeIngestion.test.ts (keeps the session running when a runtime.warning arrives during an active turn).
  • Not run: bun lint.
  • Not run: bun typecheck.
  • Not run: bun run test.

Note

Medium Risk Changes how Codex error notifications are classified, which can affect session erroring/alerting behavior if willRetry is set incorrectly. Scope is small and covered by new adapter + ingestion tests.

Overview Treats Codex method: "error" notifications with payload.willRetry: true as runtime.warning instead of runtime.error, while keeping non-retryable errors mapped to runtime.error with class: "provider_error".

Adds coverage to verify the adapter emits runtime.warning for retryable errors, and that ingestion records the warning activity without flipping an in-flight session to error or setting lastError.

Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 6d2b0df06f131f2769acb0a1262d6789c77239d1. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).

Note

Treat retryable Codex error notifications as runtime.warning instead of runtime.error

In CodexAdapter.ts, the mapToRuntimeEvents function now checks payload.willRetry on error method notifications. When true, it emits a runtime.warning event (without class: provider_error) rather than a runtime.error, keeping the session in a running state. New tests cover both the adapter mapping and the downstream session behavior in ProviderRuntimeIngestion.

Macroscope summarized 6d2b0df.
    1. Important

      Review skipped

      Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

      ⚙️ Run configuration

      Configuration used: Repository UI

      Review profile: CHILL

      Plan: Pro

      Run ID: fcab9997-a76a-4983-924f-8386f6fccce2

      You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

      Use the checkbox below for a quick retry:

      • 🔍 Trigger review
      ✨ Finishing Touches
      🧪 Generate unit tests (beta)
      • Create PR with unit tests
      • Post copyable unit tests in a comment
      • Commit unit tests in branch `t3code/keep-working-during-retries`

      Comment `@coderabbitai help` to get the list of available commands and usage tips.
    2. github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted

    3. juliusmarminge merged this4ed89e4

    4. juliusmarminge closed this

Sign in to join this conversation.