Skip to content

feat: Support plugin delegation tools in subagent UI view #11575

@daixudk96-max

Description

@daixudk96-max

Problem

Currently, the "View Sub Agents" UI feature only works for the built-in task tool. Plugin tools like delegate_task (from oh-my-opencode) correctly pass sessionId in metadata, but the UI doesn't recognize them because of a hardcoded tool name check in session-turn.tsx:

part.tool === "task" &&  // Only checks for "task"

Proposed Solution

Extend the condition to also recognize delegate_task:

(part.tool === "task" || part.tool === "delegate_task") &&

Benefits

  • Enables plugins to leverage the same subagent UI experience
  • No breaking changes to existing task tool behavior
  • Better plugin ecosystem support

Context

This is needed for oh-my-opencode plugin which uses delegate_task for its multi-model agent orchestration feature.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions