Supersedes #1140 by @s-cork. Their commit is kept as-is (rebased onto `main`), plus one follow-up commit. The fork is org-owned, so maintainers can't push to it. ## Problem ExitPlanMode always led with Auto and dropped bypass, even when the session advertised `bypassPermissions`. Clients that deliberately run in full-access mode lost that choice at plan approval. Claude Code itself offers one elevated choice and prefers bypass over Auto. It can do that because the CLI only offers bypass to users who launched with it. The adapter advertises bypass for every non-root session, so copying that priority would hide Auto for almost everyone. ## Change - Offer both Auto and bypass whenever the session advertises them (@s-cork's commit). - Follow-up: remember the mode the session left when it entered plan mode (`SessionModeManager.syncConfig`, which every mode change goes through, including plan approval since #1163). If that was `bypassPermissions`, bypass comes first and is also what the clear-context option uses. Otherwise Auto leads, as before. A remembered bypass mode is ignored if the session no longer advertises it. This also fills the gap where the clear-context choice only ever came in the Auto flavour. Partially addresses #1077. ## Validation - `npm run build`, `npm run check` and `npm run test:run` pass. - New tests cover the pre-plan mode tracking and the option order with and without a pre-plan bypass mode, including the clear-context row. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: stu <stucork@gmail.com> Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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
- Session-scoped long-running goals through the provider-neutral goal extension
- Structured errors, recovery, and warnings through the opt-in session failure extension
- Concrete model and effort defaults through the opt-in recommended config value extension
- Tool permission presentation, editable choices, and durable effects through the permission extension
Learn more about the Agent Client Protocol.
To try changes that have landed on main but are not released yet, install from the
preview channel — every push to main publishes one. See
docs/RELEASES.md.
npm install @agentclientprotocol/claude-agent-acp@preview
Subagent sessions
Subagents are exposed only after bilateral capability negotiation. Until the released ACP SDKs
preserve the draft clientCapabilities.subagents field, a supporting client may advertise
nativeSubagentSessions in _meta.jetbrains.air.capabilities; the adapter mirrors the capability
in its initialize response. The canonical field remains supported and takes precedence once it is
available. Without either client signal, Agent/Task lifecycle keeps its legacy ordinary ACP
tool-call representation and child interactions stay on the root session. Clients that use the
historical _meta["subagent-transcript"] capability or forwardSubagentText session option retain
the flattened child transcript behavior.
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).