[PR #11588] feat: support delegate_task tool in subagent UI view (#11575) #13851

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

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

State: open
Merged: No


Summary

Extended the subagent UI view support to recognize delegate_task tool from plugins, enabling the same subagent UI experience for plugin tools.

Changes Made

Modified packages/ui/src/components/session-turn.tsx:

  • Line 363: Extended the tool name check from:
    part.tool === "task"
    
    to:
    (part.tool === "task" || part.tool === "delegate_task")
    

Issue

This fix resolves #11575 - Plugin tools like delegate_task (from oh-my-opencode) correctly pass sessionId in metadata, but the UI didn't recognize them because of a hardcoded tool name check.

Benefits

  • Enables plugins to leverage the same subagent UI experience
  • No breaking changes to existing task tool behavior
  • Better plugin ecosystem support
  • Minimal code change (1 line modification)

Testing

  • Code compiles successfully
  • No breaking changes to existing functionality
  • Follows existing code patterns
**Original Pull Request:** https://github.com/anomalyco/opencode/pull/11588 **State:** open **Merged:** No --- ## Summary Extended the subagent UI view support to recognize `delegate_task` tool from plugins, enabling the same subagent UI experience for plugin tools. ## Changes Made Modified `packages/ui/src/components/session-turn.tsx`: - **Line 363**: Extended the tool name check from: ```typescript part.tool === "task" ``` to: ```typescript (part.tool === "task" || part.tool === "delegate_task") ``` ## Issue This fix resolves #11575 - Plugin tools like `delegate_task` (from oh-my-opencode) correctly pass `sessionId` in metadata, but the UI didn't recognize them because of a hardcoded tool name check. ## Benefits - ✅ Enables plugins to leverage the same subagent UI experience - ✅ No breaking changes to existing `task` tool behavior - ✅ Better plugin ecosystem support - ✅ Minimal code change (1 line modification) ## Testing - Code compiles successfully - No breaking changes to existing functionality - Follows existing code patterns
yindo added the pull-request label 2026-02-16 18:18:41 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#13851