Skip to content

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

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

Metadata

Metadata

Assignees

Labels

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

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions