Hmbown / Hmbown/Codewhale

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

Open
#5,835 1 comment 0 reactions 0 assignees View on GitHub
documentation enhancement
Dominant language
Rust
Stars
41k
Forks
3.6k
Avg merge
13h 59m
Merged PRs (30d)
299

Description

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.

Contributor guide

Open the contributing guide

Research direction

Start with crates/tui/src/acp_server.rs and the ACP section of docs/RUNTIME_API.md, then trace the /v1/* thread/turn engine and the existing session/request_permission flow. Use Zed as the reference ACP host for a conformance smoke test. Done means sessions resume after editor restart, approvals retain TUI policy semantics, and the documentation no longer claims ACP lacks shell or file-write tools.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
api, cli, documentation, testing
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.