Skip to content

Codex provider fails on SSH remote: Missing key at ["thread"]["sessionId"] in thread/start response #2668

@fionn77

Description

@fionn77

Summary

T3 Code can successfully connect to an SSH remote environment, and the integrated terminal can run codex, but starting a Codex prompt from the T3 Code UI fails immediately with a provider adapter error.

This looks like a compatibility/schema issue between T3 Code's Codex provider adapter and the Codex app-server response shape.

Environment

Client machine:

  • OS: Windows
  • App: T3 Code Alpha
  • T3 Code desktop version: 0.0.23

Remote machine:

  • OS: Linux / Ubuntu
  • Connection type: SSH remote environment
  • Codex CLI version on remote: codex-cli 0.128.0
  • codex works manually in the integrated terminal.

Error

When starting a prompt from the T3 Code UI, the run fails before Codex begins:

ProviderAdapterProcessError: Provider adapter process error (codex) for thread ...
Invalid thread/start payload: Missing key at ["thread"]["sessionId"]

Expected Behavior

T3 Code should start a Codex provider session on the SSH remote and begin the prompt normally.

Actual Behavior

The Codex provider adapter rejects the app-server thread/start response because thread.sessionId is missing.

Root Cause Suspected

The T3 Code remote adapter appears to require:

thread.sessionId

in the Codex app-server thread/start response.

However, the installed Codex app-server response did not include that key. T3 then fails during schema decoding before the provider session starts.

Local Workaround

I patched the remote T3 bundle to tolerate missing thread.sessionId by falling back to thread.id.

Conceptually, the workaround was:

if (thread.sessionId is missing) {
  thread.sessionId = thread.id;
}

After restarting the remote t3 serve process, this allowed T3 Code to get past the provider startup failure.

Suggested Fix

Either:

  1. Make thread.sessionId optional in the T3 Code Codex response schema when decoding thread/start, or
  2. Normalize Codex app-server thread responses before decoding by setting thread.sessionId = thread.id when sessionId is absent, or
  3. Ensure the Codex app-server always returns thread.sessionId for thread/start.

The important part is that T3 Code should not fail the whole provider startup if the Codex response has a valid thread id but lacks thread.sessionId.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions