Skip to content

Codex ACP startup fails when acp_model triggers session/set_model #1405

@morganmcg1

Description

@morganmcg1

Summary

Agent Canvas can save Codex ACP settings with acp_model set, for example gpt-5.5/medium. When a user submits a prompt, the conversation starts and then fails with a UI error because the backend calls session/set_model on @zed-industries/codex-acp@0.16.0, which returns JSON-RPC Method not found.

What I observed

Versions:

  • @openhands/agent-canvas: 1.0.0
  • OpenHands SDK/server: 1.28.1
  • @zed-industries/codex-acp: 0.16.0

Saved settings included:

{
  "agent_kind": "acp",
  "acp_server": "codex",
  "acp_model": "gpt-5.5/medium"
}

Server log on submit:

ACP server initialized: agent_name='codex-acp', agent_version='0.16.0'
Authenticating with ACP method: chatgpt
ERROR Failed to start ACP server: Method not found
ERROR Error during conversation run

A direct ACP smoke test showed the failing call is session/set_model: both gpt-5.5/medium and gpt-5.5 return Method not found. new_session and set_config_option(configId="reasoning_effort") work.

Relevant code path

  • openhands/sdk/agent/acp_agent.py::_start_acp_server: after conn.new_session(...), it calls _maybe_set_session_model(...) when self.acp_model is set.
  • openhands/sdk/agent/acp_agent.py::_maybe_set_session_model: for known providers with supports_set_session_model, it calls conn.set_session_model(model_id=acp_model, session_id=session_id).
  • acp/client/connection.py::set_session_model: sends the ACP method mapped as session/set_model.
  • codex-acp@0.16.0 exposes model and reasoning as session config options (model, reasoning_effort) but does not implement session/set_model.

Workaround / fix

Clearing acp_model and passing Codex config directly avoids the failing ACP method:

{
  "acp_args": [
    "-c",
    "model=\"gpt-5.5\"",
    "-c",
    "model_reasoning_effort=\"medium\""
  ],
  "acp_model": null
}

With that config, codex-acp starts successfully and reports:

model gpt-5.5
reasoning_effort medium

Suggested product fix: for Codex ACP, do not persist combined values like gpt-5.5/medium into acp_model or call session/set_model. Split model and reasoning, then apply them through Codex config args or ACP set_config_option for model and reasoning_effort.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    Completed

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions