Skip to content

Commands fail for ancient versions of codex #393

Description

@jasonLaster

I got this error when I tried to run a command with codex v0.36. I recommend first checking the current version of codex and showing an upgrade pane if it's below a minimum version.

Received invalid JSON from codex app-server.

Image

application logs

[2026-03-07T15:44:38.861Z] ---- APP SESSION START run=20ad2dd696e0 pid=41804 port=49250 cwd=/Users/jaylast ----
(node:41804) ExperimentalWarning: SQLite is an experimental feature and might change at any time
(Use `T3 Code (Alpha) --trace-warnings ...` to show where the warning was created)
[08:44:39.285] INFO (#10): Running migrations...
[08:44:39.291] INFO (#10): Migrations ran successfully
[08:44:39.853] INFO (#34): orchestration projection pipeline bootstrapped { projectors: 9 }
[08:44:39.854] INFO (#34): orchestration engine started { sequence: 0 }
[08:44:40.089] INFO (#10): T3 Code running {
  mode: 'desktop',
  port: 49250,
  cwd: '/Users/jaylast',
  keybindingsConfigPath: '/Users/jaylast/.t3/userdata/keybindings.json',
  host: '127.0.0.1',
  stateDir: '/Users/jaylast/.t3/userdata',
  staticDir: '/Applications/T3 Code (Alpha).app/Contents/Resources/app.asar/apps/server/dist/client',
  noBrowser: true,
  autoBootstrapProjectFromCwd: false,
  logWebSocketEvents: false,
  devUrl: undefined,
  authEnabled: true
}
[08:46:28.975] WARN (#70): provider command reactor failed to process event {
  eventType: 'thread.turn-start-requested',
  cause: 'Error: Provider adapter process error (codex) for thread cbc92f3f-6466-424c-81a7-629a0bdf5492: Timed out waiting for initialize.\n' +
    '    at catch (file:///Applications/T3%20Code%20(Alpha).app/Contents/Resources/app.asar/apps/server/dist/index.mjs:11173:22)\n' +
    '    at file:///Applications/T3%20Code%20(Alpha).app/Contents/Resources/app.asar/node_modules/effect/dist/internal/effect.js:685:103\n' +
    '    at Effect.fn (Alpha)\n' +
    '    at Effect.fn (definition) (Alpha) {\n' +
    '  [cause]: Error: Timed out waiting for initialize.\n' +
    '      at CodexAppServerManager.startSession (file:///Applications/T3%20Code%20(Alpha).app/Contents/Resources/app.asar/apps/server/dist/index.mjs:9644:10) {\n' +
    '    [cause]: Error: Timed out waiting for initialize.\n' +
    '        at Timeout._onTimeout (file:///Applications/T3%20Code%20(Alpha).app/Contents/Resources/app.asar/apps/server/dist/index.mjs:10008:28)\n' +
    '        at listOnTimeout (node:internal/timers:605:17)\n' +
    '        at process.processTimers (node:internal/timers:541:7)\n' +
    '  }\n' +
    '}'
}
[08:46:48.982] WARN (#70): provider command reactor failed to process event {
  eventType: 'thread.turn-start-requested',
  cause: 'Error: Provider adapter process error (codex) for thread cbc92f3f-6466-424c-81a7-629a0bdf5492: Timed out waiting for initialize.\n' +
    '    at catch (file:///Applications/T3%20Code%20(Alpha).app/Contents/Resources/app.asar/apps/server/dist/index.mjs:11173:22)\n' +
    '    at file:///Applications/T3%20Code%20(Alpha).app/Contents/Resources/app.asar/node_modules/effect/dist/internal/effect.js:685:103\n' +
    '    at Effect.fn (Alpha)\n' +
    '    at Effect.fn (definition) (Alpha) {\n' +
    '  [cause]: Error: Timed out waiting for initialize.\n' +
    '      at CodexAppServerManager.startSession (file:///Applications/T3%20Code%20(Alpha).app/Contents/Resources/app.asar/apps/server/dist/index.mjs:9644:10) {\n' +
    '    [cause]: Error: Timed out waiting for initialize.\n' +
    '        at Timeout._onTimeout (file:///Applications/T3%20Code%20(Alpha).app/Contents/Resources/app.asar/apps/server/dist/index.mjs:10008:28)\n' +
    '        at listOnTimeout (node:internal/timers:605:17)\n' +
    '        at process.processTimers (node:internal/timers:541:7)\n' +
    '  }\n' +
    '}'
}
[08:47:56.157] WARN (#70): provider command reactor failed to process event {
  eventType: 'thread.turn-start-requested',
  cause: "Error: Provider validation failed in ProviderService.sendTurn: Cannot route thread 'cbc92f3f-6466-424c-81a7-629a0bdf5492' because no persisted provider binding exists.\n" +
    '    at toValidationError (file:///Applications/T3%20Code%20(Alpha).app/Contents/Resources/app.asar/apps/server/dist/index.mjs:11379:9)\n' +
    '    at Array.<anonymous> (file:///Applications/T3%20Code%20(Alpha).app/Contents/Resources/app.asar/apps/server/dist/index.mjs:11477:31)\n' +
    '    at Effect.fn (Alpha)\n' +
    '    at Effect.fn (definition) (Alpha)'
}
[08:48:39.707] WARN (#70): provider command reactor failed to process event {
  eventType: 'thread.turn-start-requested',
  cause: 'Error: Provider adapter process error (codex) for thread 466e529d-dbd6-44c4-a3c6-f9c473dd27a5: Timed out waiting for initialize.\n' +
    '    at catch (file:///Applications/T3%20Code%20(Alpha).app/Contents/Resources/app.asar/apps/server/dist/index.mjs:11173:22)\n' +
    '    at file:///Applications/T3%20Code%20(Alpha).app/Contents/Resources/app.asar/node_modules/effect/dist/internal/effect.js:685:103\n' +
    '    at Effect.fn (Alpha)\n' +
    '    at Effect.fn (definition) (Alpha) {\n' +
    '  [cause]: Error: Timed out waiting for initialize.\n' +
    '      at CodexAppServerManager.startSession (file:///Applications/T3%20Code%20(Alpha).app/Contents/Resources/app.asar/apps/server/dist/index.mjs:9644:10) {\n' +
    '    [cause]: Error: Timed out waiting for initialize.\n' +
    '        at Timeout._onTimeout (file:///Applications/T3%20Code%20(Alpha).app/Contents/Resources/app.asar/apps/server/dist/index.mjs:10008:28)\n' +
    '        at listOnTimeout (node:internal/timers:605:17)\n' +
    '        at process.processTimers (node:internal/timers:541:7)\n' +
    '  }\n' +
    '}'
}

Activity

  1. DevTGhosh commented on Mar 16, 2026

    @DevTGhosh

    I faced the same issue. For me for some reason homebrew was not updating to the latest version. I had to reinstall use npm to get the latest version.

    npm i -g @openai/codex
    
  2. itsjeremyjohnson commented on Apr 17, 2026

    @itsjeremyjohnson

    I can confirm I am still hitting the same user-facing error string, but not in the original “ancient Codex CLI” setup from this issue.

    On my machine this is happening with a much newer stack:

    • T3 Code (Alpha) 0.0.20
    • Codex CLI 0.121.0
    • macOS 26.3 (25D125)
    • Codex auth state: authenticated
    • Account type: ChatGPT Pro

    Relevant local evidence:

    • T3’s cached provider health shows Codex as installed, authenticated, and ready:
      • version: 0.121.0
      • status: ready
      • auth.type: pro
    • Current startup logs also show codex model/list and codex account/read succeeding normally.
    • So at least in my case, this does not look limited to “Codex is too old and cannot speak the current app-server protocol.”

    What makes this feel related to the broader stuck-thread lifecycle bugs:

    • After these failures, T3’s local state.sqlite contains orphaned pending turns with turn_id = NULL, for example:
      • thread fe471aed-9aa0-403b-9022-2859be284ac2 requested at 2026-03-22T03:54:58.615Z
      • thread 2f883475-7954-43d5-b596-602e232e276b requested at 2026-03-07T18:41:15.471Z
      • thread 08094728-79ae-4624-a91b-3d6a9b235b62 requested at 2026-03-07T15:58:17.095Z
      • thread 75b2ae66-2360-48db-b407-edf34f2e512d requested at 2026-03-07T02:36:10.760Z
    • Those rows look similar to the orphaned pending-turn / stuck-session shape discussed in:
      • #313
      • #1048

    So my read is:

    1. #393 is a real issue, but the title/root cause is probably too narrow now.
    2. The same banner (Received invalid JSON from codex app-server.) can still show up on newer Codex versions.
    3. In at least some cases, the downstream effect appears to be bad persisted turn/session state rather than just a one-time startup incompatibility.

    I did not find the exact invalid-JSON line preserved in the current summary logs (server.log / server-child.log), which is also part of the problem: the visible banner survives in the UI longer than the actionable raw transport detail survives in logs.

    It would help a lot if T3 logged the offending raw app-server line / parse failure cause alongside the thread id and provider session id whenever this banner is shown.

    If useful, I can open a separate issue specifically for the newer-version + orphaned-pending-turn variant and link it back here.

  3. sashaduke commented on Apr 18, 2026

    @sashaduke

    Yup can repro this error msg consistently on latest versions of everything, it's the most common family of issues ive been encountering in various places

  4. juliusmarminge commented on Jul 20, 2026

    @juliusmarminge
    Member

    This report is tied to Codex v0.36 and the provider/update path has changed substantially. Please confirm whether it still reproduces with a currently supported Codex CLI and current T3 build, including both versions and the exact command/error.\n\n

  5. t3dotgg commented on Aug 22, 2026

    @t3dotgg
    Member

    Note

    🤖 GPT-5.6 Sol in Codex responding on behalf of Theo

    Closing because the report does not have the current details needed to investigate. The report targets an unsupported Codex release. A July 20 request for a current reproduction received no reply.

    A new issue can be opened with the current application version, reproduction steps, and relevant logs if the problem still occurs.

  6. 8 remaining items

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs more infoInitial triage showed no bug. Awaiting more info

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions