Skip to content

codex ACP client sends initialize without protocolVersion — incompatible with all codex-acp versions #919

Description

@Ji-Sir

Summary

The aioncore codex ACP client cannot complete the ACP handshake with any released @zed-industries/codex-acp version, so the built-in "Codex CLI" agent always fails with "The upstream Agent failed while handling the request".

Evidence (aioncore 0.1.70 & 0.1.71, macOS arm64)

aioncore spawns codex-acp (builtin registry pins bun x --bun @zed-industries/codex-acp@0.14.0) and sends an initialize request without the protocolVersion field. Every codex-acp version rejects it:

{"jsonrpc":"2.0","error":{"code":-32602,"message":"Invalid params","data":{"error":"missing field `protocolVersion` at line 1 column 125"},"id":1}}

Tested matrix (all fail the same way at initialize):

codex-acp result
0.9.5 -32602 missing protocolVersion
0.14.0 -32602 missing protocolVersion
0.15.0 -32602 missing protocolVersion
0.16.0 -32602 missing protocolVersion (+ thread/start method not found)

Log excerpt (aioncore log, session handshake):

codex <- frame {"jsonrpc":"2.0","error":{"code":-32602,...missing field `protocolVersion`...,"id":1}}
codex <- frame {"jsonrpc":"2.0","error":{"code":-32601,"message":"Method not found","data":"thread/start"},"id":2}
codex <- frame {"jsonrpc":"2.0","error":{"code":-32601,"message":"Method not found","data":"model/list"},"id":3}
Agent send_message failed ... "The upstream Agent failed while handling the request"

The ACP spec requires initialize params to include protocolVersion (integer). The client sends only clientInfo + capabilities.

Repro

  1. AionUi desktop (backend aioncore 0.1.70 or 0.1.71), enable the builtin Codex CLI agent, ensure codex login (ChatGPT account) is done.
  2. New conversation with backend=codex, send any message.
  3. Turn fails: "The upstream Agent failed while handling the request".

Expected

initialize should include protocolVersion (e.g. 1), and the client should handle both the old session/new and new thread/start generations of codex-acp, or pin a codex-acp version it actually interoperates with.

Separately (harder blocker for codex-acp 0.14 specifically): 0.14's embedded codex ignores the CODEX_HOME env var and always reads the real user ~/.codex; if the user's ~/.codex/config.toml contains keys newer CLI versions write (e.g. service_tier = "default" from the ChatGPT desktop app), codex-acp 0.14 fails at startup with unknown variant 'default'. codex-acp >= 0.15 honors CODEX_HOME. Agents should pass CODEX_HOME (already respected by newer codex-acp) to isolate config, or document the requirement.

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