## Description Testing this agent means wiring it into an editor's ACP integration, which is an overkill when you just want to watch the JSON and reply with JSON. This adds a second example next to `examples/steering.ts`: a minimal interactive ACP client that spawns the built agent, prints every JSON-RPC message in both directions, and turns what you type into prompts. ``` npm run build npm run example:simple-client ``` All four ways a client can get a message to this agent are reachable from the prompt" | Input | Wire | | --- | --- | | `<text>` | `session/prompt`; buffered client-side if a turn is running | | `!steer <text>` | `_session/steering`, injected into the running turn | | `!queue <text>` | `session/prompt` sent mid-turn, so the agent queues it | | `!cancel`, Ctrl-C | `session/cancel` | ## Additional options * `--debug-port=<port>` rebuilds with source maps and starts the agent under * `--inspect-brk`, paused, so a debugger can attach and step through `src/*.ts` — replacing a hand-written editor run configuration. Teardown cancels any live turn, closes the agent's stdin (its clean-exit path), waits, and only then closes the connection, so neither side dies of EPIPE and nothing is orphaned.
ACP adapter for the Claude Agent SDK
Use Claude Agent SDK from ACP-compatible clients!
This tool implements an ACP agent by using the official Claude Agent SDK, supporting:
- Context @-mentions
- Images
- Tool calls (with permission requests)
- Following
- Edit review
- TODO lists
- Nested subagent transcripts
- Interactive (and background) terminals
- Custom Slash commands
- Client MCP servers
Learn more about the Agent Client Protocol.
Nested subagent transcripts
ACP 1.2 has no standard subagent tool kind or nested-message relationship. Clients that can render
nested transcripts can opt in with clientCapabilities._meta["subagent-transcript"] = true.
The agent then forwards subagent text, thinking, and tool calls, relating nested updates to the
launching Agent/Task call through _meta.claudeCode.parentToolUseId. Agent/Task calls are marked
with _meta.claudeCode.subagent = true.
Clients that do not advertise the capability retain the legacy flattened behavior. In both modes, the normal Agent/Task tool result is preserved as the protocol-compatible fallback.
Contribution Policy
This project does not require a Contributor License Agreement (CLA). Instead, contributions are accepted under the following terms:
By contributing to this project, you agree that your contributions will be licensed under the Apache License, Version 2.0. You affirm that you have the legal right to submit your work, that you are not including code you do not have rights to, and that you understand contributions are made without requiring a Contributor License Agreement (CLA).