Skip to content

Treat retryable Codex error notifications as runtime warnings#758

Merged
juliusmarminge merged 1 commit intomainfrom
t3code/keep-working-during-retries
Mar 10, 2026
Merged

Treat retryable Codex error notifications as runtime warnings#758
juliusmarminge merged 1 commit intomainfrom
t3code/keep-working-during-retries

Conversation

@juliusmarminge
Copy link
Copy Markdown
Member

@juliusmarminge juliusmarminge commented Mar 10, 2026

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 for commit 6d2b0df. This will update automatically on new commits. Configure here.

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.

- Map Codex `error` notifications with `willRetry: true` to `runtime.warning`
- Keep active turns/sessions running during reconnect warnings
- Add adapter and ingestion tests for retry-warning behavior
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 10, 2026

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.

@github-actions github-actions bot added the vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. label Mar 10, 2026
@juliusmarminge juliusmarminge merged commit 4ed89e4 into main Mar 10, 2026
8 checks passed
@juliusmarminge juliusmarminge deleted the t3code/keep-working-during-retries branch March 10, 2026 00:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant