iOfficeAI / iOfficeAI/AionCore

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

Open
#919 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
105
Forks
169
Avg merge
5h 58m
Merged PRs (30d)
84

Description

## 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:

```json
{"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.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at the built-in Codex CLI registry and the codex ACP client's initialize handshake, then run the provided reproduction against the listed codex-acp versions. Done means the handshake includes the required protocolVersion, the client handles the documented session/new and thread/start generations or pins a compatible version, and CODEX_HOME isolates configuration where applicable.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
backend, backend-api-design
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.