Skip to content

feat(ide): run ACP sessions on the full thread/turn runtime; fix stale RUNTIME_API.md ACP docs (IDE stage 2) #5835

Description

@Hmbown

Part of the ratified IDE program (founder 2026-09-02; PRD §6 "IDE direction"). Stage 2: Codewhale as an agent option in ACP hosts (Zed, JetBrains, VS Code, Neovim all host ACP agents today).

Current state

crates/tui/src/acp_server.rs (codewhale serve --acp) implements initialize / session/new / session/prompt / session/cancel, streams session/update chunks, executes tools locally through a ToolRegistry built from the same file/search/git/patch/shell tools as the CLI exec agent, and gates them via session/request_permission.

Two gaps:

  1. Session weight: the header documents that prompts route through the same configured client as one-shot CLI mode with a per-session tool loop — not the full thread/turn runtime. ACP sessions therefore lack durable threads, snapshots, steering, and approval parity with the Runtime API.
  2. Stale docs: docs/RUNTIME_API.md (~lines 293-310) claims ACP "does not yet expose shell tools, file-write tools" — false against the current code.

Deliver

  • ACP sessions backed by the same thread/turn engine as /v1/* (durable threads, resume, snapshots where the ACP surface allows), with session/request_permission mapped onto the engine's approval model (AskForApproval, execpolicy).
  • Rewrite the ACP section of docs/RUNTIME_API.md to match reality.
  • A conformance smoke test against a real ACP host (Zed is the reference implementation of the client side).

Acceptance

  • A Zed-hosted Codewhale session survives editor restart (thread resume).
  • Permission prompts in the host map to engine approvals with the same policy semantics as the TUI.
  • Docs match the code; stale claim removed.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationenhancementNew feature or request

    Projects

    • Status
      Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions