Skip to content

Add Amp as a known ACP provider#210

Open
akuttig-block wants to merge 4 commits intomainfrom
add-amp-acp-provider
Open

Add Amp as a known ACP provider#210
akuttig-block wants to merge 4 commits intomainfrom
add-amp-acp-provider

Conversation

@akuttig-block
Copy link
Copy Markdown
Collaborator

@akuttig-block akuttig-block commented Apr 2, 2026

Register amp-acp as a known ACP provider alongside Goose, Claude Code, and Codex, and fix permission mode handling to work across different ACP adapters.

Changes

Amp provider support

  • desktop/src-tauri/src/managed_agents/discovery.rs — Add Amp to KNOWN_ACP_PROVIDERS with command amp-acp and avatar URL; add amp-acp to default_agent_args()
  • crates/sprout-acp/src/config.rs — Add amp-acp to default_agent_args() match arm; update doc comment
  • crates/sprout-acp/README.md — Add "Running with Amp" section with install and usage instructions; list amp-acp in supported agents

Permission mode compatibility

  • crates/sprout-acp/src/pool.rs — Replace exact-match agent_supports_mode() with resolve_mode_id() that tries the canonical ACP wire string first (e.g. bypassPermissions), then falls back to known aliases (e.g. amp-acp advertises bypass instead). Fully backwards compatible — existing agents match on the first check.
  • crates/sprout-acp/src/pool.rs — Demote AcpError::Protocol from fatal to warn-and-continue in apply_permission_mode(). JSON-RPC error responses like -32601 Method not found were incorrectly treated as transport errors, causing an infinite respawn loop.
  • crates/sprout-acp/src/acp.rs + pool.rs — Add session/set_mode RPC method and fall back to it when session/set_config_option is unsupported. amp-acp implements setSessionMode (newer ACP method) instead of set_config_option (Claude-style), which was the root cause of agents getting stuck in (blocked-on-user) state.

Install

npm install -g amp-acp

Usage

export AMP_API_KEY="..."
export SPROUT_ACP_AGENT_COMMAND="amp-acp"
sprout-acp

The desktop app auto-discovers amp-acp if it's on PATH.

Register amp-acp (https://github.com/tao12345666333/amp-acp) as a known
ACP provider alongside Goose, Claude Code, and Codex.

- Add Amp to KNOWN_ACP_PROVIDERS in the desktop discovery module
- Add amp-acp to default_agent_args in both sprout-acp and desktop
- Add 'Running with Amp' section to the sprout-acp README

Amp-Thread-ID: https://ampcode.com/threads/T-019d4e6c-6235-76b4-aaf3-63baf10304d0
Co-authored-by: Amp <amp@ampcode.com>
@wesbillman
Copy link
Copy Markdown
Collaborator

Screenshot 2026-04-02 at 4 05 23 PM

@akuttig-block sorry for the delay here. I also hadn't set up amp yet, so this was a good excuse to. It seems like with amp installed, but no acp our doctor page doesn't show Amp at all. Maybe we should also have a doctor item for it to help users onboard?

akuttig-block and others added 3 commits April 2, 2026 18:35
Replace exact-match agent_supports_mode() with resolve_mode_id() that
tries the canonical ACP wire string first, then falls back to known
aliases (e.g. amp-acp advertises "bypass" instead of
"bypassPermissions").

Fully backwards compatible — existing agents that use the standard wire
strings match on the first check and never hit the alias path.

Amp-Thread-ID: https://ampcode.com/threads/T-019d4e6c-6235-76b4-aaf3-63baf10304d0
Co-authored-by: Amp <amp@ampcode.com>
AcpError::Protocol covers both real transport corruption and clean
JSON-RPC error responses (e.g. -32601 'Method not found'). When an
agent like amp-acp doesn't implement session/set_config_option, the
error was treated as fatal, causing an infinite respawn loop.

Move Protocol out of the fatal arm so it falls through to the
warn-and-continue path. The harness falls back to per-tool
auto-approval, which is the correct behavior.

Amp-Thread-ID: https://ampcode.com/threads/T-019d4e6c-6235-76b4-aaf3-63baf10304d0
Co-authored-by: Amp <amp@ampcode.com>
amp-acp implements session/set_mode (with modeId param) instead of
session/set_config_option (with configId 'mode'). The harness now
tries set_config_option first (Claude-style), and if the agent
returns a method-not-found error, falls back to set_mode (amp-acp
style). This fixes the (blocked-on-user) issue where amp-acp agents
never received the bypass mode and prompted for permissions.

Amp-Thread-ID: https://ampcode.com/threads/T-019d4e6c-6235-76b4-aaf3-63baf10304d0
Co-authored-by: Amp <amp@ampcode.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants