Follow Discord
Sweep 20 Nov 2026 · 19:55Z Build v2.1.330 547 read Stable v2.1.323 Latest v2.1.330 Next v2.1.330 Feeds RSS JSON llms.txt llms-full.txt Unofficial
One change · claude-code

Agent SDK reference - TypeScript changedagent-sdk/typescript

Upstream edited this page at 22 Nov 2026 18:50 UTC, give or take a minute or two: the time comes from Anthropic’s own sitemap rather than from a commit. This site recorded the change at 22 Nov 2026 19:07 UTC.

Upstream edited
Recorded here
Lines+2added
Lines−3removed
From line 149 where the diff opens
First seen 14 Aug 2026 this site's first read of the page
Recorded edits147to this page, all time

The whole hunk

from line 149, old and new numbered
/
lines

This page is larger than the 256 KiB this site keeps, so one side of the diff below stops where the stored text does.

from line 149
149149| `options` | [`Options`](#options) | Optional configuration object, the same type that `startup()` takes |
150150| `initializeTimeoutMs` | `number` | Maximum time in milliseconds to wait for the spare's initialization. Defaults to `60000`. If initialization doesn't complete in time, the promise rejects with a timeout error |
151151 
152`prewarm()` counts time spent in [Setup](https://code.claude.com/docs/en/hooks.md#setup) hooks toward `initializeTimeoutMs`, even when you leave it unset. To give slow Setup hooks more time, set a longer value.
153 
154152#### Returns
155153 
156154Returns a `Promise<`[`SpareProcess`](#spareprocess)`>` that resolves once the spare is ready to claim.
from line 1291
12931291| `disallowedTools` | No | Array of tool names to explicitly disallow for this agent. MCP server-level patterns are also accepted: `mcp__server` or `mcp__server__*` removes every tool from that server, and `mcp__*` removes every MCP tool from any server |
12941292| `prompt` | Yes | The agent's system prompt |
12951293| `model` | No | Model override for this agent. Accepts an alias such as `'fable'`, `'opus'`, `'sonnet'`, `'haiku'`, `'inherit'`, or a full model ID. `'inherit'` uses the model of the agent that spawned this one. When you omit `model`, Claude Code picks the model in the [subagent model order](https://code.claude.com/docs/en/sub-agents.md#choose-a-model) |
1296| `mcpServers` | No | MCP server specifications for this agent |
1294| `mcpServers` | No | MCP server specifications for this agent. Put a [`createSdkMcpServer()`](#createsdkmcpserver) server in the `mcpServers` field of [`Options`](#options). If you pass the server object in this field instead, TypeScript Agent SDK v0.3.327 or later ignores it and emits a `CLAUDE_SDK_AGENT_IN_PROCESS_SERVER` warning |
12971295| `skills` | No | Array of skill names to preload into the agent context |
12981296| `initialPrompt` | No | Auto-submitted as the first user turn when this agent runs as the main thread agent |
12991297| `maxTurns` | No | Maximum number of agentic turns (API round-trips) before stopping |
from line 4264
42664264 taskId: string;
42674265 timeoutMs: number;
42684266 persistent?: boolean;
4267 keptInSandboxByCheck?: boolean;
42694268};
42704269```
42714270 
from line 4692
46934692 plan: string | null;
46944693 isAgent: boolean;
46954694 filePath?: string;
4696 hasTaskTool?: boolean;
4697 planWasEdited?: boolean;
4698 awaitingLeaderApproval?: boolean;
4699 requestId?: string;
4700}
4695 hasTaskTool?: b
Feedback