Skip to content

OpenCode chat: subagents are not surfaced like Claude Code's #893

Closed

Description

@Ploppy3

Problem

Claude Code panes surface their session's subagents as background work: running count in the message-box button and sidebar badge, an ended-subagent card with its answer, BG turn state, and lost detection (since 0.4.4, #527/#534; guide). An OpenCode pane gets none of it, even though OpenCode 2 records each subagent as a child session in the same store the chat reads.

Evidence (v0.4.8, OpenCode v2.0.27)

  • The reader is bound to the one session herdr reports (herdr:opencode) and every page query filters WHERE session_id = ? — opencode.ts#L72, #L330. Child sessions are never read.
  • A subagent is session_v2.parent_id plus its own session_message rows (own seq space). Confirmed in a live store: 1,114 child sessions, 22,016 child messages.
  • The parent's only record is the subagent tool part: {agent, description, prompt}, state.status running, answer wrapped in raw <subagent …> text; a background call gets a launch ack and later a synthetic wake row (source: "subagent") drawn as a plain notice.
  • No test or doc mentions OpenCode subagents.

Acceptance

  • An OpenCode pane's subagents counted and listed where a Claude pane's are: button count, sidebar badge, newest ten ended in the last day.
  • An ended subagent leaves a card in the chat with its answer.
  • A turn that ends while its subagents run reads BG, the finish alerted once; a subagent whose pane no longer runs that session reads as lost.

Activity

  1. changed the title [-]OpenCode chat: subagents are not surfaced like Claude Code's (no count, badge, end card or BG)[/-] [+]OpenCode chat: subagents are not surfaced like Claude Code's[/+] on Oct 12, 2026
  2. added 3 commits that reference this issue on Oct 26, 2026
    b1b2a42
    29ea863
    e3038f4
  3. added a commit that references this issue on Oct 26, 2026
    afdf3a7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions