Skip to content
Source
Sign inSign up
pingdotgg/t3code

Codex thread/resume fails with list_turns is not supported yet when continuing a desktop thread on Android #12462

Closedpmf111(GitHub profile, opens in a new tab) opened this issue 4 comments

What happened: Working on a Codex thread in T3 Code desktop (Windows), then continuing that same thread in the T3 Android app fails on every turn with "Provider turn start failed". The thread becomes unusable on mobile.

Diagnosis: T3 resumes the provider thread via thread/resume (openCodexThread, apps/server/src/provider/Layers/CodexSessionRuntime.ts). The Codex app-server rejects it with CodexAppServerRequestError: list_turns is not supported yet (code -32601), which surfaces as ProviderAdapterProcessError (codex) from startSession via ensureSessionForThread / processTurnStartRequested. isRecoverableThreadResumeError only matches missing-thread snippets, so unlike a missing thread this capability/version mismatch never falls back to thread/start and the turn fails fatally. Upstream openai/codex#37754 documents the same thread/resume -> list_turns not supported failure under app-server version skew. Cross-device resume (desktop CODEX_HOME thread plus possibly different Codex version on Android) is the likely trigger here.

Steps to reproduce:

  1. On T3 Code desktop (Windows), work in a Codex-backed thread until it has turns.
  2. Open the same thread in the T3 Android app.
  3. Send a message.
  4. Every turn fails with Provider turn start failed / list_turns is not supported yet.

Version: 0.0.42 (desktop T3 Code Alpha on Windows; Android app 1.2.0)

Environment: Windows plus T3 Code (Alpha) 0.0.42 desktop; T3 Android app 1.2.0; codex-cli 0.154.0 on desktop; provider codex.

Evidence:

Provider turn start failed
ProviderAdapterProcessError: Provider adapter process error (codex) for thread <thread-id>: list_turns is not supported yet
    at startSession (bin.mjs)
    at ensureSessionForThread (bin.mjs)
    at processTurnStartRequested (bin.mjs)
[cause]: CodexAppServerRequestError: list_turns is not supported yet
[cause]: Error: list_turns is not supported yet

(Home-directory paths redacted. gh issue list --search list_turns in pingdotgg/t3code returns nothing.)

Related issues:

  • openai/codex#37754 (resume fails: list_turns is not supported yet, thread/resume calling unsupported list_turns; version-skew daemon hypothesis). Not a T3 duplicate: no pingdotgg/t3code issue mentions list_turns. Possibly related T3-side: #2584 (Codex provider turn start fails, different payload cause, same startSession path).

Fix applied or workaround: None applied. Suggested: treat code -32601 / "not supported yet" / "list_turns" on thread/resume as recoverable (extend isRecoverableThreadResumeError or handle method-not-found separately) and fall back to thread/start with a user-visible notice that the provider session restarted from persisted T3 history, mirroring the missing-thread path. A version/capability check at connect would also help.

Filed by: opencode/muse-spark-1.3-contributor-free via T3 triage playbook.

  1. Triage

    Confirmed bug. Continuing a Codex thread from Android after it was used on desktop fails because T3’s thread/resume is rejected by the Codex app-server with:

    list_turns is not supported yet (JSON-RPC -32601)

    That becomes ProviderAdapterProcessError (codex) from startSession via ensureSessionForThread / processTurnStartRequested. The thread then fails on every send.

    T3 never calls list_turns. Codex’s thread/resume does, internally. This is the same upstream failure as openai/codex#37754 (open): the serving store hits the default list_turns impl (not supported yet), commonly from app-server/store version skew, paginated history, or missing SQLite thread metadata even when the rollout file is still present.

    Where it breaks

    • apps/server/src/provider/Layers/CodexSessionRuntime.ts — openCodexThread() resumes with excludeTurns: true, then falls back to thread/start only when isRecoverableThreadResumeError() matches.
    • Recoverable snippets are missing-thread wordings (not found, missing thread, no such thread, unknown thread, does not exist, no rollout found). The matcher also requires the message to contain "thread".
    • The reported message is exactly list_turns is not supported yet. It does not contain "thread", so a snippet-only add of list_turns / not supported yet would still not match.
    • apps/server/src/provider/Layers/CodexAdapter.ts — startSession maps the failure to ProviderAdapterProcessError.
    • Android does not run Codex. The host is the Windows T3 server (codex-cli 0.154.0) spawning codex app-server. Desktop likely kept a live session; the mobile send (or a later startSession) is what hits resume.

    Not duplicates

    • #2584 — same stack, different cause (Invalid thread/start payload: priority vs fast|flex). Closed via #2590.
    • #10481 — ChatGPT-archived Codex session; needs thread/unarchive, not a fresh start.
    • #7075 — heap exhaustion from loading full thread/resume history. T3 already sends excludeTurns: true.
    • openai/codex#37754 — same list_turns resume failure. Related upstream, not a T3 duplicate (no existing t3code issue mentions list_turns).

    Related T3 work: #6671 added no rollout found to the recoverable list and documented the "thread" gate. That fallback is silent (server warning only); there is no user-visible “session restarted” notice today.

    Suggested fix

    Treat -32601 / list_turns / not supported yet on thread/resume as a capability mismatch, not as a missing thread:

    1. Match on RPC code and/or list_turns, without requiring the word "thread".
    2. Fall back to thread/start so the T3 thread is usable again.
    3. Tell the user the Codex provider session restarted and native Codex context may be gone. The rollout is often still on disk — this is not the same as no rollout found.
    4. Log Codex CLI version vs the initialize handshake server version (helps catch leftover daemon / store skew).

    Do not fold this into the archived-session path (#10481) or the large-history path (#7075).

    Workaround

    Start a new thread. On the host: upgrade Codex, run codex doctor, and restart any leftover codex app-server daemon if CLI and daemon versions differ.

    Severity

    High for the affected thread (every turn fails). Accepting as a Codex resume-path bug with an upstream root cause T3 can mitigate.

  2. juliusmarminge added labelsbug

  3. juliusmarminge added labelsaccepted

  4. juliusmarminge added labelsupstream

  5. juliusmarminge added labelsvia-triage

  6. Update from local diagnosis (reporter machine, T3 Code Alpha 0.0.42 desktop on Windows, Codex provider): updating the npm Codex CLI 0.154.0 -> 0.155.0 made every Codex provider status check time out on desktop ('Timed out while checking Codex app-server provider status'; trace shows probeCodexAppServerProvider/withCodexAppServerClient interrupted after ~10-20s, no codex processes survive). Rolling back to 0.154.0 restored successful checks. So 0.155.0 appears incompatible with (or hangs under) this T3 version's status probe. The original list_turns resume failure was unaffected by the update. Happy to open this as a separate issue if preferred.

  7. Follow-up from the reporter machine: the failure evolved but stays on the same code path. After a corrupt 768MB thread_history_1.sqlite was moved aside and rebuilt, resume now fails with 'failed to list thread history: thread-store internal error ... (code: 11) database disk image is malformed', and the freshly rebuilt database is already malformed again within ~24h (verified: even PRAGMA integrity_check cannot open it). Same-device idle threads are affected too, not just cross-device resume. The PR branch has been extended accordingly: unreadable-history errors ('failed to list thread history', 'thread-store internal error', 'database disk image is malformed') now also fall back to thread/start. The recurring store corruption itself looks like an upstream Codex issue.

  8. Note

    🤖 GPT-6.1-Sol responding on behalf of Theo

    This issue should be resolved in the next nightly build by Orchestrator v2 (#2829).

    Please try that nightly. If the problem still exists, open a new issue with the nightly version you tested and steps to reproduce it.

Sign in to join this conversation.