hermes - 💡(How to fix) Fix Proposal: native ACP client transport alongside copilot_acp_client.py shim

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Add a second path for ACP client integration: a proper ProviderTransport subclass (api_mode: "acp_client") with native JSON-RPC 2.0 stdio, parallel to the existing chat_completions shim via copilot_acp_client.py.

Root Cause

Add a second path for ACP client integration: a proper ProviderTransport subclass (api_mode: "acp_client") with native JSON-RPC 2.0 stdio, parallel to the existing chat_completions shim via copilot_acp_client.py.

Fix Action

Fix / Workaround

Several open PRs extend the shim with env vars / config flags (#31089, #20570, #30734, #32418). This issue proposes a complementary path: a dedicated transport class for ACP-native clients, mirroring the codex_app_server pattern (sync threads + queues + 3-arm dispatch).

  • Wire layer: agent/transports/acp_client.py (~340 LOC, parallel to codex_app_server.py)
  • Session: agent/transports/acp_client_session.py (~460 LOC, parallel to codex_app_server_session.py)
  • Runtime: agent/acp_runtime.py (~170 LOC, parallel to codex_runtime.py)
  • Early-return dispatch in conversation_loop.py
  • Reuses existing agent.acp_command / agent.acp_args fields gated by api_mode == "acp_client" (no collision with provider == "copilot-acp")
RAW_BUFFERClick to expand / collapse

Summary

Add a second path for ACP client integration: a proper ProviderTransport subclass (api_mode: "acp_client") with native JSON-RPC 2.0 stdio, parallel to the existing chat_completions shim via copilot_acp_client.py.

Motivation

Current ACP integration rides chat_completions via OpenAI client replacement. This works for OpenAI-compat agents but flattens the protocol — no native session lifecycle, no server-initiated request channel, no streaming via session/update notifications.

Several open PRs extend the shim with env vars / config flags (#31089, #20570, #30734, #32418). This issue proposes a complementary path: a dedicated transport class for ACP-native clients, mirroring the codex_app_server pattern (sync threads + queues + 3-arm dispatch).

Proposed approach

  • Wire layer: agent/transports/acp_client.py (~340 LOC, parallel to codex_app_server.py)
  • Session: agent/transports/acp_client_session.py (~460 LOC, parallel to codex_app_server_session.py)
  • Runtime: agent/acp_runtime.py (~170 LOC, parallel to codex_runtime.py)
  • Early-return dispatch in conversation_loop.py
  • Reuses existing agent.acp_command / agent.acp_args fields gated by api_mode == "acp_client" (no collision with provider == "copilot-acp")

Tradeoffs

  • (+) Native protocol semantics; server-initiated requests (fs/permissions plumbing complete, capabilities minimal in v1, enabling deferred to follow-up PRs)
  • (+) Bisect-safe coexistence with copilot_acp_client.py (no shim modification)
  • (+) Follows established codex_app_server pattern, no new abstractions
  • (−) ~3000 LOC of new code in agent/transports/ (vs ~50 LOC for the env-var shim extension in #31089)
  • (−) Two ways to integrate ACP agents (shim path + native path) until maintainers decide convergence direction (or keep both as complementary)

Related upstream PRs

  • #31089 (env-var extension on copilot_acp_client) — complementary band-aid approach
  • #33999, #20570 (other ACP backend integrations) — also via shim path
  • #14606 (acp_adapter restructure) — orthogonal

Implementation

PR #32401 implements this proposal. Tests: 114 ACP-related (57 unit + 12 integration + 41 CLI switch + 1 concurrent-write regression guard + 3 E2E gated HERMES_E2E_ACP=1). User guide + cli-config.yaml.example updated. Cross-platform: subprocess stdlib only, tested on macOS.

If the maintainers prefer the env-var shim path long-term, the PR can be closed and the architectural learnings captured here. If the parallel transport is acceptable, PR #32401 is ready for review.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

hermes - 💡(How to fix) Fix Proposal: native ACP client transport alongside copilot_acp_client.py shim