Skip to content
Source
Sign inSign up
pingdotgg/t3code

Thread not being marked as "Working" when non-critical errors happen #765

ClosedNoojuno(GitHub profile, opens in a new tab) opened this issue 3 comments

What version of T3 Code?

All versions, but tests recorded on commit 4ed89e4

Issue Summary

When using Codex on my work mac, the WebSocket responses API for codex always fails, tries to reconnect 5 times, and then falls back to SSE. When this happens, we get 5 different "errors" from Codex, but none of them are fatal.

This is causing the thread to be put in "Working" state, then immediately having it's status removed after the first error, never going back into "Working" even though the thread continues to run in the background. It does successfully get marked as completed.

I have tested with the changes from #758, and the issue still occurs.

Examples

For both examples, I have a recording with the thread running in the foreground and a thread running in the background so you are able to view the sidebar status easier.

Example 1: Thread with a successful response

https://github.com/user-attachments/assets/2dd581e1-8822-43ed-9ce8-0683b7edf9d3

https://github.com/user-attachments/assets/3809cda4-1404-4b56-b1cd-997507401203

Example 2: Thread with a failed response (invalid model with my Codex plan)

https://github.com/user-attachments/assets/4525e756-a1d1-49db-b806-8c658d1347cf

https://github.com/user-attachments/assets/c2cbd4ee-8d32-4a73-bbd2-2c768a8e9f84

Additional Context

The underlying issue with Codex is a whole different issue where it doesn't respect my CA certs via the WS transport layer, but that needs to be fixed in the Codex repo as it also happens in the CLI.

  1. I was actually on the wrong commit when I recorded the videos 🙃, but I have actually confirmed that it still occurs on the latest main.

    Upon further investigation it appears that it's because we get two errors:

    [CodexAdapter] error-kind event received {
      id: '...',
      kind: 'error',
      provider: 'codex',
      threadId: '...',
      createdAt: '2026-03-10T02:18:44.738Z',
      method: 'process/stderr',
      message: '2026-03-10T02:18:44.738625Z ERROR codex_api::endpoint::responses_websocket: failed to connect to websocket: IO error: invalid peer certificate: BadSignature, url: wss://chatgpt.com/backend-api/codex/responses'
    }
    [CodexAdapter] error event received {
      id: '...',
      kind: 'notification',
      provider: 'codex',
      threadId: '...',
      createdAt: '2026-03-10T02:18:44.739Z',
      method: 'error',
      turnId: '...',
      itemId: undefined,
      textDelta: undefined,
      payload: {
        error: {
          message: 'Reconnecting... 3/5',
          codexErrorInfo: [Object],
          additionalDetails: 'stream disconnected before completion: invalid peer certificate: BadSignature'
        },
        willRetry: true,
        threadId: '...',
        turnId: '...'
      }
    }

    The first one has no metadata that allows us to identify that it is non-fatal, so we always get an error even though the changes from #758 are handling the second error as a warning.

  2. juliusmarminge closed this

  3. @juliusmarminge This was closed with the WS logging, but it is still an issue and I don't have permission to reopen. Would you mind reopening it? 🙏

  4. juliusmarminge reopened this

  5. Retryable Codex errors and non-fatal process stderr are now normalized as runtime warnings, and warning ingestion preserves the active running session. Fatal stderr remains separately classified, addressing the state-loss path reported here.

    This was closed as part of a large repo-wide maintenance sweep. If you think it's still relevant, please reopen.

  6. juliusmarminge closed this

Sign in to join this conversation.