Skip to content

Map fatal Codex stderr to runtime errors#1615

Merged
juliusmarminge merged 1 commit intomainfrom
feature/codex-stderr-fatal-error
Mar 31, 2026
Merged

Map fatal Codex stderr to runtime errors#1615
juliusmarminge merged 1 commit intomainfrom
feature/codex-stderr-fatal-error

Conversation

@juliusmarminge
Copy link
Copy Markdown
Member

@juliusmarminge juliusmarminge commented Mar 31, 2026

  • Detect websocket connection failures in process stderr
  • Emit runtime.error with provider_error for fatal cases
  • Keep nonfatal stderr mapped to warnings

What Changed

Why

UI Changes

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
  • I included a video for animation/interaction changes

Note

Medium Risk
Changes runtime event classification for a subset of process/stderr messages, which may affect user-visible error handling and any alerting/retry logic keyed off runtime.warning vs runtime.error. Scope is limited to string-matching a single fatal snippet with added test coverage.

Overview
Codex process/stderr notifications are now conditionally promoted from runtime.warning to runtime.error when the stderr message matches a known fatal websocket-connection failure snippet (emitting class: "provider_error").

Adds a focused lifecycle test to ensure websocket connection stderr is treated as fatal while non-matching stderr remains a warning.

Written by Cursor Bugbot for commit c80f188. This will update automatically on new commits. Configure here.

Note

Map fatal Codex process/stderr messages to runtime.error events

In CodexAdapter.ts, mapToRuntimeEvents now checks process/stderr notifications against a list of fatal substrings (currently "failed to connect to websocket"). Matching messages produce a runtime.error with class: 'provider_error' instead of a runtime.warning. Non-fatal stderr continues to yield runtime.warning as before.

Macroscope summarized c80f188.

- Detect websocket connection failures in process stderr
- Emit `runtime.error` with `provider_error` for fatal cases
- Keep nonfatal stderr mapped to warnings
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 31, 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: 109750e4-9197-403b-85ab-1d68efd64c24

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
  • Commit unit tests in branch feature/codex-stderr-fatal-error

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions bot added size:S 10-29 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. labels Mar 31, 2026
@juliusmarminge juliusmarminge merged commit aa5521d into main Mar 31, 2026
11 checks passed
@juliusmarminge juliusmarminge deleted the feature/codex-stderr-fatal-error branch March 31, 2026 22:10
gigq pushed a commit to gigq/t3code that referenced this pull request Apr 6, 2026
Chrono-byte pushed a commit to Chrono-byte/t3code that referenced this pull request Apr 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S 10-29 changed lines (additions + deletions). 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