Skip to content

feat: ACP native subagents - #627

Merged
jcarver989 merged 10 commits into
mainfrom
feat/acp-native-subagents
Oct 24, 2026
Merged

jcarver989 merged 10 commits into
mainfrom
feat/acp-native-subagents

Conversation

@jcarver989

@jcarver989 jcarver989 commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

This PR migrates sub-agents to use native ACP v2 sub-agent sessions, and replaces the custom _aether/sub_agent_progress notification.

Each sub-agent now runs in its own session, which can be cancelled on its own, shown with its full transcript, and restored when a session is resumed.

Changes

  • Each sub-agent gets its own session. Sub-agents used to be identified by positional task_N IDs, and the only way to stop one was to cancel the whole batch. Each sub-agent now runs under its own UUID session ID and can be cancelled individually, both while it is starting and while it is running. Every sub-agent reports exactly one start event and one end event, even when it fails or panics.
  • Native ACP sub-agent reporting. The parent session announces each sub-agent with a SubagentUpdate, which carries the title, the spawning tool call, the cancel capability, and the running or idle state. The sub-agent's messages, tool calls, and nested sub-agents are sent on the sub-agent's own session ID. As the ACP sub-agent RFD asks, each state change is sent on the sub-agent's own session and mirrored on the parent's SubagentUpdate.
  • Client support. The acp-utils Conversation, wisp, and the browser package show each sub-agent as a nested conversation under the tool call that spawned it, with the sub-agent's full transcript. A Conversation now knows its own session ID, so it ignores events for unrelated sessions and only looks for a sub-agent when an event belongs to another session.
  • Sub-agent status follows the ACP sub-agent RFD. A sub-agent shows success, failed, or cancelled once it goes idle. Before its first state report, and after a cleared or unknown state, a lost connection, or a resume that replayed it, its status is unconfirmed rather than running or finished, and wisp shows it with ?. The state on the sub-agent's own session and its mirror on the parent are applied as one state.
  • Sub-agent usage is folded, not forwarded. The parent replaces each sub-agent usage sample with the one it adds to its own totals, so consumers no longer have to skip the child's copy.
  • Sub-agent transcripts are persisted. Sub-agent events were never written to the session log before, so resuming a session lost every sub-agent. They are now persisted under the same rules as the parent's events, so replay restores them.
  • Failed turns end with the error stop reason. A failed turn used to end with end_turn, so clients could not tell it apart from a successful turn. It now ends with ACP's error stop reason and includes the failure message.
  • One code path builds the agent context. The live agent and resumed sessions now build their Context from the same events through a single ContextRecorder. Before this change, they used two separate implementations.
  • Dependency upgrades. agent-client-protocol is upgraded to 3.5 and the ACP TypeScript SDK to 2.0, which provide the v2 sub-agent types.

Breaking changes

  • The _aether/sub_agent_progress notification is removed. Clients must handle subagent_update and the updates sent on each sub-agent's own session.
  • spawn_subagent results return sessionId instead of taskId.
  • Clients receive the error stop reason instead of end_turn when a turn fails.
  • Session usage events and the session_usage index view expose sub_agent_session_id instead of task_id. The edited migration causes existing session-index databases to be rebuilt.
  • In acp-utils, Conversation::new takes the session ID, and SubAgent::status returns None while the sub-agent's work is unconfirmed. In the browser package's conversation snapshots, a sub-agent's status can be null.
  • UserEvent::ClearContext is removed from the session log format. A log line that still holds one is now read as malformed.

Swap the `unstable_session_compaction` feature for `unstable_subagents`
and move TypeScript imports to `experimental/v2/unstable`, where the
v2 sub-agent types live.

ACP 3.5 merges `_meta` updates key by key, so tool display metadata now
always sends `display_value` (null when empty) to clear a stale value.
Add an `AetherMeta` trait with default `to_meta`/`from_meta` so meta
types stop copy-pasting the namespaced (de)serialization, and
`running_state`/`idle_state` test helpers for ACP state updates.
@jcarver989
jcarver989 force-pushed the feat/acp-native-subagents branch from 80e5bca to 7f161e3 Compare October 24, 2026 17:31
@jcarver989 jcarver989 changed the title Feat/acp native subagents feat: ACP native subagents Oct 24, 2026
The live agent edited its `Context` in place while resumed sessions
rebuilt it from logged events with separate logic in `aether-sessions`.
Both now feed every event through one `ContextRecorder`, so a resumed
context is produced by the same code as the live one.

`ChatMessage::assistant_reply` replaces `Context::push_assistant_turn`,
and `UserEvent::ClearContext` is removed: nothing records it, and the
agent's own `Cleared` event already clears a replayed context.
A failed turn used to go idle with `end_turn`, so clients could not tell
it apart from a successful one. It now ends with ACP's `error` stop
reason, carrying the failure message as internal error data.

BREAKING CHANGE: clients receive `error` instead of `end_turn` when a
turn fails.
Sub-agents were known by positional `task_N` IDs and could only be
stopped by cancelling the whole batch. Each now runs under a UUID
session registered in a shared `SubAgentSessions`, so a single
sub-agent can be cancelled by ID, whether it is still starting or
already running.

Every sub-agent reports exactly one start, carrying its task prompt,
and one end, even when it fails or panics before its agent exists.

The parent now replaces a sub-agent's usage sample with the one it
folds into its own totals instead of forwarding both, so consumers no
longer have to skip the child's copy.

BREAKING CHANGE: `spawn_subagent` results report `sessionId` instead of
`taskId`.
Replace the custom `_aether/sub_agent_progress` notification with ACP
v2 sub-agent support. The parent session announces each sub-agent with
a `SubagentUpdate` (title, spawning tool call, cancel capability and
running/idle state), while the sub-agent's own task, messages, tool
calls and nested sub-agents are sent on its own session ID. Cancelling
that session ID cancels the live sub-agent.

Clients (`acp-utils` `Conversation`, wisp and the browser package)
route events for announced sub-agent sessions into a nested
conversation on the spawning tool call, so each sub-agent keeps its
full transcript. A `Conversation` knows its own session ID, so only
sub-agent events are routed and events for other sessions are ignored.

Following ACP's sub-agent RFD, the child's state and its mirror on the
parent are applied as one state, and a sub-agent's status stays
unconfirmed until it is reported, and again after a cleared or
`unknown` state, a lost connection, or a resume that replayed it.

BREAKING CHANGE: `_aether/sub_agent_progress` is removed; clients must
handle `subagent_update` and the sub-agent's own session updates.
`Conversation::new` takes the session ID, and `SubAgent::status`
returns `None` while the sub-agent's work is unconfirmed.
Sub-agent progress was never written to the session log, so resuming
a session lost every sub-agent. Its events now follow the parent's
persistence policy (complete messages, tool calls, turn start and
end).
Sub-agents are now addressed by session rather than by task, so
`UsageSource.task_id` becomes `sub_agent_session_id`, along with the
matching session-index column. The edited migration trips the index's
schema-drift check, which rebuilds existing databases.

BREAKING CHANGE: session usage events and the `session_usage` index
view expose `sub_agent_session_id` instead of `task_id`.
@jcarver989
jcarver989 force-pushed the feat/acp-native-subagents branch from 7f161e3 to 18d0076 Compare October 24, 2026 20:44
@jcarver989
jcarver989 marked this pull request as ready for review October 24, 2026 21:13
@jcarver989
jcarver989 enabled auto-merge (squash) October 24, 2026 21:13
@jcarver989
jcarver989 merged commit c7a8d93 into main Oct 24, 2026
16 checks passed
@jcarver989
jcarver989 deleted the feat/acp-native-subagents branch October 24, 2026 21:18
jcarver989 pushed a commit that referenced this pull request Nov 3, 2026
## 🤖 New release

* `aether-utils`: 0.3.0 -> 0.3.1
* `aether-llm-codegen`: 0.2.34 -> 0.2.35
* `aether-llm`: 0.9.18 -> 0.9.19
* `aether-acp-utils`: 0.5.18 -> 0.5.19
* `aether-agent-core`: 0.9.9 -> 0.9.10
* `aether-project`: 0.5.63 -> 0.5.64
* `aether-sessions`: 0.3.18 -> 0.3.19
* `aether-mcp-servers`: 0.8.9 -> 0.8.10
* `aether-client-core`: 0.0.1 -> 0.1.0
* `aether-wisp`: 0.7.19 -> 0.7.20
* `aether-agent-cli`: 0.9.20 -> 0.9.21
* `aether-schemas`: 0.3.0 -> 0.3.1
* `aether-auth`: 0.1.20 -> 0.1.21
* `aether-mcp-utils`: 0.7.16 -> 0.7.17
* `aether-telemetry`: 0.3.18 -> 0.3.19
* `aether-evals`: 0.5.0 -> 0.5.1

<details><summary><i><b>Changelog</b></i></summary><p>

## `aether-utils`

<blockquote>

##
[0.3.1](aether-utils-v0.3.0...aether-utils-v0.3.1)
- 2026-11-03

### Added

- *(desktop)* browse repository files and open where tools worked
([#637](#637))
- add aether-desktop gpui client
([#635](#635))
</blockquote>

## `aether-llm-codegen`

<blockquote>

##
[0.2.35](aether-llm-codegen-v0.2.34...aether-llm-codegen-v0.2.35)
- 2026-11-03

### Added

- add gpt-6.1-terra to codex subscription models
([#642](#642))
</blockquote>

## `aether-llm`

<blockquote>

##
[0.9.19](aether-llm-v0.9.18...aether-llm-v0.9.19)
- 2026-11-03

### Added

- add gpt-6.1-terra to codex subscription models
([#642](#642))
- ACP native subagents
([#627](#627))

### Other

- Update models
([#638](#638))
- Update models
([#628](#628))
</blockquote>

## `aether-acp-utils`

<blockquote>

##
[0.5.19](aether-acp-utils-v0.5.18...aether-acp-utils-v0.5.19)
- 2026-11-03

### Added

- *(desktop)* browse repository files and open where tools worked
([#637](#637))
- ACP native subagents
([#627](#627))

### Other

- extract aether-client-core from wisp
([#634](#634))
</blockquote>

## `aether-agent-core`

<blockquote>

##
[0.9.10](aether-agent-core-v0.9.9...aether-agent-core-v0.9.10)
- 2026-11-03

### Added

- ACP native subagents
([#627](#627))
</blockquote>

## `aether-project`

<blockquote>

##
[0.5.64](aether-project-v0.5.63...aether-project-v0.5.64)
- 2026-11-03

### Other

- update Cargo.toml dependencies
</blockquote>

## `aether-sessions`

<blockquote>

##
[0.3.19](aether-sessions-v0.3.18...aether-sessions-v0.3.19)
- 2026-11-03

### Added

- add aether-desktop gpui client
([#635](#635))
- ACP native subagents
([#627](#627))
</blockquote>

## `aether-mcp-servers`

<blockquote>

##
[0.8.10](aether-mcp-servers-v0.8.9...aether-mcp-servers-v0.8.10)
- 2026-11-03

### Added

- add gpt-6.1-terra to codex subscription models
([#642](#642))
- *(desktop)* browse repository files and open where tools worked
([#637](#637))
- ACP native subagents
([#627](#627))

### Other

- replace aether-lspd with clankerdiff-lspd
([#633](#633))
</blockquote>

## `aether-client-core`

<blockquote>

##
[0.1.0](aether-client-core-v0.0.1...aether-client-core-v0.1.0)
- 2026-11-03

### Added

- *(desktop)* browse repository files and open where tools worked
([#637](#637))

### Other

- extract aether-client-core from wisp
([#634](#634))
</blockquote>

## `aether-wisp`

<blockquote>

##
[0.7.20](aether-wisp-v0.7.19...aether-wisp-v0.7.20)
- 2026-11-03

### Added

- *(desktop)* browse repository files and open where tools worked
([#637](#637))
- ACP native subagents
([#627](#627))

### Other

- extract aether-client-core from wisp
([#634](#634))
</blockquote>

## `aether-agent-cli`

<blockquote>

##
[0.9.21](aether-agent-cli-v0.9.20...aether-agent-cli-v0.9.21)
- 2026-11-03

### Added

- add gpt-6.1-terra to codex subscription models
([#642](#642))
- *(desktop)* browse repository files and open where tools worked
([#637](#637))
- ACP native subagents
([#627](#627))

### Other

- extract aether-client-core from wisp
([#634](#634))
- replace aether-lspd with clankerdiff-lspd
([#633](#633))
</blockquote>

## `aether-schemas`

<blockquote>

##
[0.3.1](aether-schemas-v0.3.0...aether-schemas-v0.3.1)
- 2026-11-03

### Other

- update Cargo.lock dependencies
</blockquote>

## `aether-auth`

<blockquote>

##
[0.1.21](aether-auth-v0.1.20...aether-auth-v0.1.21)
- 2026-11-03

### Other

- updated the following local packages: aether-utils
</blockquote>

## `aether-mcp-utils`

<blockquote>

##
[0.7.17](aether-mcp-utils-v0.7.16...aether-mcp-utils-v0.7.17)
- 2026-11-03

### Other

- updated the following local packages: aether-utils, aether-auth
</blockquote>

## `aether-telemetry`

<blockquote>

##
[0.3.19](aether-telemetry-v0.3.18...aether-telemetry-v0.3.19)
- 2026-11-03

### Other

- updated the following local packages: aether-utils, aether-llm,
aether-agent-core
</blockquote>

## `aether-evals`

<blockquote>

##
[0.5.1](aether-evals-v0.5.0...aether-evals-v0.5.1)
- 2026-11-03

### Other

- updated the following local packages: aether-utils, aether-llm,
aether-agent-core
</blockquote>


</p></details>

---
This PR was generated with
[release-plz](https://github.com/release-plz/release-plz/).

Co-authored-by: contextbridge-pr-automation[bot] <259134118+contextbridge-pr-automation[bot]@users.noreply.github.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.

1 participant