Select structured ACP adapters from the resolved agent command #200

Closed
opened 2026-09-06 17:56:59 +01:00 by naps62-yolo · 0 comments
Collaborator

Goal

Make the structured-session backend select an ACP adapter from the resolved agent command instead of always launching claude-code-acp.

Requirements

  • Introduce provider-aware adapter definitions for Claude Code and Codex, using claude-code-acp and the maintained @agentclientprotocol/codex-acp package respectively.
  • Resolve claude and codex through the repository's existing command-resolution semantics, including wrappers and path-qualified commands.
  • Use the session's persisted command to select the same adapter during daemon recovery and session/load; do not add a redundant provider field to the wire schema.
  • Make adapter lookup, child-process diagnostics, installation guidance, and authentication failures name the selected provider.
  • Reject unsupported structured commands explicitly instead of silently launching Claude.
  • Cover fresh spawn, failed spawn, shutdown, recovery, and resume selection with focused tests.

Contract

The current lifecycle is documented in docs/STRUCTURED-VIEW.md, especially “What a structured session is,” “The adapter,” and “Restart recovery.” Preserve its process ownership, bounded handshake, event-log, and cancellation guarantees.

Non-goals

  • Web or TUI spawn-form changes.
  • Codex-specific event compatibility beyond establishing the provider-aware transport.
  • Adding a general third-party ACP registry.
## Goal Make the structured-session backend select an ACP adapter from the resolved agent command instead of always launching `claude-code-acp`. ## Requirements - Introduce provider-aware adapter definitions for Claude Code and Codex, using `claude-code-acp` and the maintained `@agentclientprotocol/codex-acp` package respectively. - Resolve `claude` and `codex` through the repository's existing command-resolution semantics, including wrappers and path-qualified commands. - Use the session's persisted command to select the same adapter during daemon recovery and `session/load`; do not add a redundant provider field to the wire schema. - Make adapter lookup, child-process diagnostics, installation guidance, and authentication failures name the selected provider. - Reject unsupported structured commands explicitly instead of silently launching Claude. - Cover fresh spawn, failed spawn, shutdown, recovery, and resume selection with focused tests. ## Contract The current lifecycle is documented in `docs/STRUCTURED-VIEW.md`, especially “What a structured session is,” “The adapter,” and “Restart recovery.” Preserve its process ownership, bounded handshake, event-log, and cancellation guarantees. ## Non-goals - Web or TUI spawn-form changes. - Codex-specific event compatibility beyond establishing the provider-aware transport. - Adding a general third-party ACP registry.
naps62-yolo added this to the Codex structured sessions milestone 2026-09-06 17:56:59 +01:00
naps62-yolo added a new dependency 2026-09-06 17:57:00 +01:00
naps62-yolo added a new dependency 2026-09-06 17:57:00 +01:00
naps62-yolo added a new dependency 2026-09-06 17:57:00 +01:00
naps62-yolo added the area/daemondifficulty/hardtype/feat labels 2026-09-06 17:57:21 +01:00
This repo is archived. You cannot comment on issues.
1 Participants
Due Date
No due date set.
Reference: naps62/maestro#200