Skip to content

specs: add product and tech spec for ACP client support (GH7326)#9380

Open
nigelpurvis wants to merge 3 commits intowarpdotdev:masterfrom
nigelpurvis:nigelpurvis/spec-acp-support
Open

specs: add product and tech spec for ACP client support (GH7326)#9380
nigelpurvis wants to merge 3 commits intowarpdotdev:masterfrom
nigelpurvis:nigelpurvis/spec-acp-support

Conversation

@nigelpurvis
Copy link
Copy Markdown

Description

Adds product and tech spec for ACP client support, addressing issue #7326. Proposes a new AcpHarness implementing the existing ThirdPartyHarness trait, modeled on GeminiHarness, with user-configurable commands and JSON-RPC stdio transport for v1.

@cla-bot
Copy link
Copy Markdown

cla-bot Bot commented Apr 29, 2026

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have the users @nigelpurvis on file. In order for us to review and merge your code, each contributor must visit https://cla.warp.dev to read and agree to our CLA. Once you have done so, please comment @cla-bot check to trigger another check.

@oz-for-oss
Copy link
Copy Markdown
Contributor

oz-for-oss Bot commented Apr 29, 2026

@nigelpurvis

I'm starting a first review of this spec-only pull request.

I completed the review and posted feedback on this pull request.

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

I'm re-reviewing this spec-only pull request in response to a review request.

You can view the conversation on Warp.

I completed the review and posted feedback on this pull request.

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

@nigelpurvis
Copy link
Copy Markdown
Author

@cla-bot check

@cla-bot cla-bot Bot added the cla-signed label Apr 29, 2026
@cla-bot
Copy link
Copy Markdown

cla-bot Bot commented Apr 29, 2026

The cla-bot has been summoned, and re-checked this pull request!

Copy link
Copy Markdown
Contributor

@oz-for-oss oz-for-oss Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overview

This PR adds product and tech specs for ACP-compatible CLI agents in Warp. The specs describe the user-facing goal and identify several relevant integration points, but the implementation design leaves the core ACP transport integration, configuration model, and security boundaries unresolved.

Concerns

  • The tech spec does not define how a bidirectional JSON-RPC stdio ACP process integrates with the current ThirdPartyHarness terminal-command runner or how ACP events become Warp conversation, diff, and tool-call UI state.
  • The product and tech specs conflict on whether session resumption is required in v1.
  • The configuration model for multiple user-defined ACP agents is not specified enough to implement settings, selector entries, persistence, or serialized selection state.
  • The proposed CLIAgent::Acp(String) shape does not fit current CLIAgent method signatures and derived traits.

Security

  • Arbitrary configured commands/args and automatic MCP passthrough need explicit trust-boundary, argv/shell-safety, consent, and scoping requirements before implementation.

Verdict

Found: 0 critical, 7 important, 0 suggestions

Request changes

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

Comment thread specs/GH7326/product.md
Comment on lines +48 to +52
3. User clicks "Add ACP agent" and enters:
- **Name** (e.g. "opencode", "Kimi")
- **Command** (e.g. `opencode`, `kimi`)
- **Args** (optional, e.g. `--model gpt-4o`)
4. Warp validates the command exists on PATH. If not, shows an error with a link
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [IMPORTANT] [SECURITY] The spec lets users configure arbitrary commands and args but does not define the execution trust boundary; require argv-based execution rather than shell interpolation, PATH/absolute-path resolution rules, and whether synced/shared config can cause another machine to execute a command.

Comment thread specs/GH7326/product.md Outdated
- Text responses appear as agent message blocks.
- File edits surface in Warp's diff view for review.
- Tool calls (if passed via MCP) render as tool call blocks.
4. The session persists in conversation history and is resumable.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [IMPORTANT] This makes ACP sessions resumable in v1, but line 95 and tech.md line 199 make resumption an open/follow-up item; choose one requirement and align the success criteria.

Comment thread specs/GH7326/tech.md

```rust
// command_prefix
CLIAgent::Acp(cmd) => cmd.as_str(),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [IMPORTANT] command_prefix() currently returns &'static str and CLIAgent derives Copy/Sequence; CLIAgent::Acp(String) => cmd.as_str() will not fit those contracts, so specify the enum/API redesign or store configured ACP metadata elsewhere.

Comment thread specs/GH7326/tech.md Outdated
- `validate()` → call `validate_cli_installed(&self.command, self.install_docs_url())`
- `install_docs_url()` → `None` (unknown for arbitrary agents; follow-up can add a registry)
- `prepare_environment_config()` → write ACP session config if needed; for v1 this may be a no-op or minimal JSON config file with MCP server list
- `build_command()` → spawn `self.command` with `self.args`, plus the stdio transport flags required by ACP (`--acp` or similar, depending on agent)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [IMPORTANT] --acp or similar is not an implementable generic launch contract; specify whether ACP mode flags are entirely user-provided, come from per-agent presets, or are guaranteed by ACP-compatible CLIs.

Comment thread specs/GH7326/tech.md
Comment on lines +88 to +90
The ACP protocol handshake (JSON-RPC `initialize` / `initialized` exchange over
stdio) is handled in a new `run_acp_session()` function within this file, called
from `run()`. The initialize request must include:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [IMPORTANT] The core implementation path is underspecified: existing third-party harness runners launch terminal commands, while ACP needs a bidirectional JSON-RPC stdio process and an adapter into Warp's native conversation, diff, and tool-call UI.

Comment thread specs/GH7326/tech.md Outdated
Comment on lines +110 to +112
**MCP passthrough:** After initialization, if Warp has configured MCP servers,
they are passed to the agent via the ACP session configuration per the protocol
spec before the first prompt is sent.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [IMPORTANT] [SECURITY] Passing all configured MCP servers to arbitrary ACP agents changes the trust boundary and may expose local/private data or credentials; define user consent, default scoping, allow/deny behavior, and log redaction expectations.

Comment thread specs/GH7326/tech.md
Comment on lines +120 to +125
### 5. `app/src/terminal/view/ambient_agent/harness_selector.rs`

Add `Harness::Acp` to the harness selector dropdown. For user-configured ACP
agents, each appears as a separate entry using its display name (the command
string). This requires reading the list of configured ACP agents from settings
and generating one selector entry per agent.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [IMPORTANT] The settings/config story is incomplete; define the schema, persistence/sync behavior, stable identity for multiple ACP agents, and how selector state serializes a specific configured agent rather than only Harness::Acp.

@nigelpurvis
Copy link
Copy Markdown
Author

/oz-review

Copy link
Copy Markdown
Contributor

@oz-for-oss oz-for-oss Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overview

This PR adds product and tech specs for supporting ACP-compatible agents in Warp through a generic third-party harness. The specs cover the intended UX, repository files likely to change, testing ideas, and follow-ups.

Concerns

  • The proposed ACP handshake and message flow do not match the current ACP protocol, so an implementation following the spec would not interoperate with compliant agents.
  • The configurable-agent model is internally inconsistent: the proposed CLIAgent::Acp(String) conflicts with the current Copy/static API, while the tradeoffs section recommends a different fieldless/settings-backed design.
  • The spec does not fully define how ACP conversation persistence maps to Warp's existing external conversation/block snapshot flow.

Security

  • The design introduces arbitrary user-configured agent commands and forwards MCP server configuration to third-party processes, but does not define the trust boundary, consent model, shell/process launching constraints, or log redaction for secret-bearing MCP env/args.
  • The ACP client surface can include agent-to-client file and terminal requests; the spec needs to map those to Warp permission gates and workspace boundaries before implementation.

Verdict

Found: 1 critical, 5 important, 0 suggestions

Request changes

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

Comment thread specs/GH7326/product.md
5. Configured ACP agents appear in the harness selector alongside Claude Code,
Codex, and Gemini.
6. MCP servers configured in Warp are passed to the ACP agent session.
7. Conversation history for ACP sessions persists and is viewable.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [IMPORTANT] This makes conversation history persistence a v1 success criterion, but the UX section says resumption may be out of scope and the tech spec does not define what ACP state is saved; specify whether v1 stores Warp block snapshots only, ACP transcripts/session IDs, or full agent-resumable history.

Comment thread specs/GH7326/tech.md

```rust
/// An ACP-compatible agent with a user-configured command.
Acp(String),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [IMPORTANT] CLIAgent::Acp(String) conflicts with the current CLIAgent shape (Copy, Sequence, and &'static str command/display APIs), and lines 153-160 recommend a different fieldless/settings-backed design; choose one data model and update the proposed changes accordingly.

Comment thread specs/GH7326/tech.md Outdated
- `validate()` → call `validate_cli_installed(&self.command, self.install_docs_url())`
- `install_docs_url()` → `None` (unknown for arbitrary agents; follow-up can add a registry)
- `prepare_environment_config()` → write ACP session config if needed; for v1 this may be a no-op or minimal JSON config file with MCP server list
- `build_command()` → spawn `self.command` with `self.args`, plus the stdio transport flags required by ACP (`--acp` or similar, depending on agent)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [IMPORTANT] ACP does not define a universal --acp flag, so appending a generic transport flag would break arbitrary ACP agents; the spec should require users or a registry to provide the exact command/args needed for each agent.

Comment thread specs/GH7326/tech.md
Comment on lines +92 to +100
```json
{
"jsonrpc": "2.0",
"id": 1,
"method": "initialize",
"params": {
"clientInfo": { "name": "warp", "version": "<warp_version>" },
"capabilities": {}
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚨 [CRITICAL] The initialize example is not ACP-compatible: the request must include protocolVersion and clientCapabilities, the response is an initialize response, and ACP does not have an LSP-style initialized notification before session setup; rewrite this flow around initialize followed by session/new/session/prompt.

Comment thread specs/GH7326/tech.md Outdated
Comment on lines +110 to +112
**MCP passthrough:** After initialization, if Warp has configured MCP servers,
they are passed to the agent via the ACP session configuration per the protocol
spec before the first prompt is sent.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [IMPORTANT] [SECURITY] MCP server configs can include secret-bearing env vars and executable args; specify whether forwarding them to an arbitrary configured ACP agent requires explicit user consent, how values are redacted from logs/snapshots, and whether any MCP servers are filtered.

Comment thread specs/GH7326/tech.md
Comment on lines +143 to +147
Warp sends prompt as ACP session/message
Agent streams response chunks
Warp renders chunks as conversation blocks
File edits → diff view
Tool calls → tool call blocks
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [IMPORTANT] [SECURITY] The prompt loop omits the agent-to-client request surface (file reads/writes, terminal commands, permission requests); define how ACP requests map to Warp's existing approval UX, diff review, and workspace/path boundaries so third-party agents cannot bypass user review.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant