[DOCS] Naming inconsistency: "Task" tool vs "AgentInput" interface in TypeScript SDK

Resolved 💬 3 comments Opened Jan 12, 2026 by coygeek Closed Feb 27, 2026

Documentation Type

Unclear/confusing documentation

Documentation Location

  • docs/en/agent-sdk/subagents.md - docs/en/agent-sdk/typescript.md - docs/en/agent-sdk/python.md

Section/Topic

The Tool Input Types section in the TypeScript SDK reference and the subagent invocation instructions.

Current Documentation

In docs/en/agent-sdk/subagents.md (Detecting subagent invocation):

"Subagents are invoked via the Task tool. To detect when a subagent is invoked, check for tool_use blocks with name: "Task"."

In docs/en/agent-sdk/typescript.md (Tool Input Types):
The header is titled Task, but the interface is defined as:

interface AgentInput {
  description: string;
  prompt: string;
  subagent_type: string;
}

In docs/en/agent-sdk/python.md (Tool Input/Output Types):
The documentation consistently uses "Task":

"Tool name: Task" followed by a Python dictionary structure.

What's Wrong or Missing?

There is a naming mismatch between the actual tool name (Task) and the TypeScript interface name (AgentInput).

When a TypeScript user is configuring allowedTools in their Options object, the presence of an interface named AgentInput strongly implies the tool should be named "Agent". However, the subagent documentation and the Python SDK both indicate the tool is named "Task". This creates a high probability of configuration errors where TS developers add "Agent" to their allowedTools array, which will fail to enable subagent delegation.

Suggested Improvement

Option A (Preferred for consistency):
Rename the interface in the TypeScript SDK/documentation from AgentInput to TaskInput to match the actual tool name and the header title.

Option B (Documentation fix):
Explicitly list the string literal required for allowedTools in the TypeScript reference, similar to how it is done in the Python reference.

Suggested text for docs/en/agent-sdk/typescript.md:

### Task Tool name: Task ``typescript interface TaskInput { // Renamed from AgentInput description: string; prompt: string; subagent_type: string; } ``

Impact

High - Prevents users from using a feature

Additional Context

  • Links to related documentation: docs/en/agent-sdk/python.md#task (which correctly identifies the tool name as Task).
  • Example of potential user error:

``typescript
// User sees AgentInput in docs and writes:
const result = await query({
prompt: "...",
options: {
allowedTools: ["Agent"] // This is wrong, should be "Task"
}
});
``

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗