Skip to content

ACP: classify Task tool as kind 'think' (subagent cards) #30557

Closed

Description

@Seluj78

Note: This issue was surfaced by the Agent of Empires project (agent-of-empires/agent-of-empires#1904).

Problem

When opencode spawns a subagent via its task tool, the ACP toToolKind function at packages/opencode/src/acp/tool.ts:65-86 returns "other" because "task" falls through to the default branch. This means any ACP client (including the AoE cockpit dashboard) cannot render the task tool call in a dedicated ThinkToolCard — it shows as a generic "other" card instead.

Current code

export function toToolKind(toolName: string): ToolKind {
  const tool = toolName.toLocaleLowerCase()
  switch (tool) {
    case "bash":
    case "shell":  return "execute"
    case "webfetch": return "fetch"
    case "edit":
    case "patch":
    case "write": return "edit"
    case "grep":
    case "glob":
    case "context":
    case "context7_resolve_library_id":
    case "context7_get_library_docs": return "search"
    case "read": return "read"
    default: return "other"
  }
}

Note: "think" is not a recognized ToolKind at all in the current codebase.

Request

Add case "task": return "think" to toToolKind so ACP clients can dispatch task subagent tool calls to the correct card type. This likely also requires adding "think" to the ToolKind type definition.

References

Activity

  1. github-actions commented on Jun 3, 2026

    @github-actions
    Contributor

    This issue doesn't fully meet our contributing guidelines.

    What needs to be fixed:

    • This appears to be a feature request, but the title does not start with [FEATURE]: as required by the feature request template.
    • The feature request template was not used — it requires a verification checkbox confirming you've searched for existing issues and a description of the problem/need in the template format.

    Please edit this issue to address the above within 2 hours, or it will be automatically closed.

    If you believe this was flagged incorrectly, please let a maintainer know.

  2. Seluj78 commented on Jun 3, 2026

    @Seluj78
    Author

    Yeah no that's wrong. it's a bug and not a feature request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

needs:complianceThis means the issue will auto-close after 2 hours.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions