[PR #12563] feat(acp): expose subagents in available modes response #14270

Open
opened 2026-02-16 18:19:05 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/12563

State: open
Merged: No


Summary

Expose subagents in ACP available modes response for client-side access.

Closes #11576

Problem

ACP clients (e.g., agent-shell for Emacs) cannot access subagent information through ACP. Users need this to @mention specific subagents.

Solution

  • Add optional mode field to ModeOption type
  • Remove server-side subagent filter
  • Clients can filter by mode field if they only want primary agents

Changes

- type ModeOption = { id: string; name: string; description?: string }
+ type ModeOption = { id: string; name: string; description?: string; mode?: string }
- .filter((agent) => agent.mode !== "subagent" && !agent.hidden)
+ .filter((agent) => !agent.hidden)
  .map((agent) => ({
    id: agent.name,
    name: agent.name,
    description: agent.description,
+   mode: agent.mode,
  }))

Backward Compatibility

Existing clients continue to work. The mode field is optional and only adds information.

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/12563 **State:** open **Merged:** No --- ## Summary Expose subagents in ACP available modes response for client-side access. Closes #11576 ## Problem ACP clients (e.g., [agent-shell](https://github.com/xenodium/agent-shell) for Emacs) cannot access subagent information through ACP. Users need this to `@mention` specific subagents. ## Solution - Add optional `mode` field to `ModeOption` type - Remove server-side subagent filter - Clients can filter by `mode` field if they only want primary agents ## Changes ```diff - type ModeOption = { id: string; name: string; description?: string } + type ModeOption = { id: string; name: string; description?: string; mode?: string } ``` ```diff - .filter((agent) => agent.mode !== "subagent" && !agent.hidden) + .filter((agent) => !agent.hidden) .map((agent) => ({ id: agent.name, name: agent.name, description: agent.description, + mode: agent.mode, })) ``` ## Backward Compatibility Existing clients continue to work. The `mode` field is optional and only adds information.
yindo added the pull-request label 2026-02-16 18:19:05 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#14270