Follow Discord
Sweep 22 Oct 2026 · 21:04Z Build v2.1.309 528 read Stable v2.1.308 Latest v2.1.309 Next v2.1.309 Feeds RSS JSON llms.txt llms-full.txt Unofficial
HomeDocsSearch
Search the documentation

1,120 pages for message.

Titles and paths first, then pages whose text carries it. Each row opens that page as this site last read it.

claude-opus-4 Claude Developer Platform · in the page release-notes/system-prompts/claude-opus-4 …bsite for more information. If the person asks Claude about how many messages they can send, costs of Claude, how to perform actions within the application, or other product questions related to Clau… claude-opus-4-1 Claude Developer Platform · in the page release-notes/system-prompts/claude-opus-4-1 …bsite for more information. If the person asks Claude about how many messages they can send, costs of Claude, how to perform actions within the application, or other product questions related to Clau… claude-opus-4-5 Claude Developer Platform · in the page release-notes/system-prompts/claude-opus-4-5 …bsite for more information. If the person asks Claude about how many messages they can send, costs of Claude, how to perform actions within the application, or other product questions related to Clau… claude-opus-4-6 Claude Developer Platform · in the page release-notes/system-prompts/claude-opus-4-6 …bsite for more information. If the person asks Claude about how many messages they can send, costs of Claude, how to perform actions within the application, or other product questions related to Clau… claude-opus-4-7 Claude Developer Platform · in the page release-notes/system-prompts/claude-opus-4-7 …oduct for more information. If the person asks Claude about how many messages they can send, costs of Claude, how to perform actions within the application, or other product questions related to Clau… claude-opus-4-8 Claude Developer Platform · in the page release-notes/system-prompts/claude-opus-4-8 …1'. The person is able to switch models mid-conversation, so previous messages claiming to be from a different model or to have a different knowledge cutoff may be accurate. Claude Opus 4.8 is also p… claude-opus-5 Claude Developer Platform · in the page release-notes/system-prompts/claude-opus-5 …ic's site. The person can switch models mid-conversation, so earlier messages in this thread that identify as a different model or report a different knowledge cutoff may still be accurate. Claude i… claude-opus-5-5 Claude Developer Platform · in the page release-notes/system-prompts/claude-opus-5-5 …ic's site. The person can switch models mid-conversation, so earlier messages in this thread that identify as a different model or report a different knowledge cutoff may still be accurate. Claude i… claude-sonnet-3-5 Claude Developer Platform · in the page release-notes/system-prompts/claude-sonnet-3-5 …zzle, it writes out the puzzle's constraints explicitly stated in the message, quoting the human's message to support the existence of each constraint. Sometimes Claude can accidentally overlook minor… claude-sonnet-3-7 Claude Developer Platform · in the page release-notes/system-prompts/claude-sonnet-3-7 …bsite for more information. If the person asks Claude about how many messages they can send, costs of Claude, how to perform actions within the application, or other product questions related to Clau… claude-sonnet-4 Claude Developer Platform · in the page release-notes/system-prompts/claude-sonnet-4 …bsite for more information. If the person asks Claude about how many messages they can send, costs of Claude, how to perform actions within the application, or other product questions related to Clau… claude-sonnet-4-5 Claude Developer Platform · in the page release-notes/system-prompts/claude-sonnet-4-5 …bsite for more information. If the person asks Claude about how many messages they can send, costs of Claude, how to perform actions within the application, or other product questions related to Clau… claude-sonnet-4-6 Claude Developer Platform · in the page release-notes/system-prompts/claude-sonnet-4-6 …it. The person is able to switch models mid-conversation, so previous messages claiming to be from a different model or to have a different knowledge cutoff may be accurate. Above Opus sits Anthropic… claude-sonnet-5 Claude Developer Platform · in the page release-notes/system-prompts/claude-sonnet-5 …uncements. The person can switch models mid-conversation, so earlier messages in this thread that identify as a different model or report a different knowledge cutoff may still be accurate. Claude i… claude-sonnet-5-5 Claude Developer Platform · in the page release-notes/system-prompts/claude-sonnet-5-5 …ic's site. The person can switch models mid-conversation, so earlier messages in this thread that identify as a different model or report a different knowledge cutoff may still be accurate. Claude i… develop-tests Claude Developer Platform · in the page test-and-evaluate/develop-tests …hropic.Anthropic() def get_completion(prompt: str): message = client.messages.create( model="claude-opus-5-5", max_tokens=1024, messages=[{"… handle-streaming-refusals Claude Developer Platform · in the page test-and-evaluate/strengthen-guardrails/handle-streaming-refusals …harm." } } ``` In the event stream, `stop_details` arrives on the `message_delta` event alongside `stop_reason`. <Note> A `refusal` response from streaming classifiers includes a `stop_details`… mitigate-jailbreaks Claude Developer Platform · in the page test-and-evaluate/strengthen-guardrails/mitigate-jailbreaks …ock. On supported models, you can also use a [mid-conversation system message](https://platform.claude.com/docs/en/build-with-claude/mid-conversation-system-messages). * **Limit Claude's access to se… reduce-latency Claude Developer Platform · in the page test-and-evaluate/strengthen-guardrails/reduce-latency …se Claude Haiku 5.5 at low effort curl https://api.anthropic.com/v1/messages \ -H "x-api-key: $ANTHROPIC_API_KEY" \ -H "anthropic-version: 2023-06-01" \ -H "content-type: application/jso… Use Claude Code with a screen reader Claude Code CLI · in the page accessibility …et [`CLAUDE_AX_STARTUP_QUIET_MS`](/docs/en/env-vars#variables). Each message in the transcript starts with a label your screen reader announces, naming what it is: your messages, Claude's replies and… Escalate hard decisions with the advisor tool Claude Code CLI · in the page advisor …ad. With `claude --advisor fable`, Claude Code exits at launch with a message that points to `/model fable`. In a [background session](#use-the-advisor-flag), it starts the session without the advisor… How the agent loop works Claude Code CLI · in the page agent-sdk/agent-loop # How the agent loop works > Understand the message lifecycle, tool execution, context window, and architecture that power your SDK agents. The Agent SDK lets you embed Claude Code's autonomous agen… Use Claude Code features in the SDK Claude Code CLI · in the page agent-sdk/claude-code-features …ull} from claude_agent_sdk import query, ClaudeAgentOptions, AssistantMessage, ResultMessage import asyncio async def main(): async for message in query( prompt="Help me refactor the aut… Configure your agent Claude Code CLI · in the page agent-sdk/configuration …rt { query } from "@anthropic-ai/claude-agent-sdk"; for await (const message of query({ prompt: "Summarize the open TODOs in this repo", options: { model: "claude-sonnet-5", allowedTools:… Track cost and usage Claude Code CLI · in the page agent-sdk/cost-tracking …* **TypeScript** provides per-step token breakdowns on each assistant message (`message.message.id`, `message.message.usage`), per-model cost via `modelUsage` on the result message, and a cumulative t… Give Claude custom tools Claude Code CLI · in the page agent-sdk/custom-tools …[Add tool annotations](#add-tool-annotations). | | Control the error message Claude reads | Return `isError: true` to compose the message instead of surfacing the raw exception. See [Handle errors](#… Rewind file changes with checkpointing Claude Code CLI · in the page agent-sdk/file-checkpointing …e modifying them through the Write, Edit, or NotebookEdit tools. User messages in the response stream include a checkpoint UUID that you can use as a restore point. > [!NOTE] > > File rewinding resto… Intercept and control agent behavior with hooks Claude Code CLI · in the page agent-sdk/hooks …eme={null} import asyncio from claude_agent_sdk import ( AssistantMessage, ClaudeSDKClient, ClaudeAgentOptions, HookMatcher, ResultMessage, ) # Define a hook callback that receiv… Hosting the Agent SDK Claude Code CLI · in the page agent-sdk/hosting …rt { query } from "@anthropic-ai/claude-agent-sdk"; for await (const message of query({ prompt: "Summarize the files in this directory", options: { cwd: "/work/session-a" }, })) { console.log(m… Connect to external tools with MCP Claude Code CLI · in the page agent-sdk/mcp …rt { query } from "@anthropic-ai/claude-agent-sdk"; for await (const message of query({ prompt: "Use the docs MCP server to explain what hooks are in Claude Code", options: { mcpServers: {… Migrate to Claude Agent SDK Claude Code CLI · in the page agent-sdk/migration-guide …(v0.0.x) - Used Claude Code's system prompt by default async for message in query(prompt="Hello"): print(message) # AFTER (v0.1.0) - Uses minimal system prompt by default # To ge… Modifying system prompts Claude Code CLI · in the page agent-sdk/modifying-system-prompts …{null} import { query } from "@anthropic-ai/claude-agent-sdk"; const messages = []; for await (const message of query({ prompt: "Add a new React component for user profiles", options: { syst… Observability with OpenTelemetry Claude Code CLI · in the page agent-sdk/observability …main(): options = ClaudeAgentOptions(env=OTEL_ENV) async for message in query( prompt="List the files in this directory", options=options ): print(message) asyncio.run(m… Configure permissions Claude Code CLI · in the page agent-sdk/permissions …dk import query, ClaudeAgentOptions async def main(): async for message in query( prompt="Help me refactor this code", options=ClaudeAgentOptions( permission_mode="de… Plugins in the SDK Claude Code CLI · in the page agent-sdk/plugins …rt { query } from "@anthropic-ai/claude-agent-sdk"; for await (const message of query({ prompt: "Hello", options: { plugins: [ { type: "local", path: "./my-plugin" }, { type: "loc… Agent SDK reference - Python Claude Code CLI · in the page agent-sdk/python …on with Claude Code by default. Returns an async iterator that yields messages as they arrive. Each call to `query()` starts fresh with no memory of previous interactions unless you pass `continue_con… Quickstart Claude Code CLI · in the page agent-sdk/quickstart …ncio from claude_agent_sdk import query, ClaudeAgentOptions, AssistantMessage, ResultMessage async def main(): # Agentic loop: streams messages as Claude works async for message in query(… Persist sessions to external storage Claude Code CLI · in the page agent-sdk/session-storage …uery with the store attached, captures the session ID from the result message, then resumes from the store in a second `query()` call. The second call passes the same store instance plus `resume`, so… Work with sessions Claude Code CLI · in the page agent-sdk/sessions …se()`](/docs/en/agent-sdk/python#claudesdkclient) to iterate over the messages for the current query. Use the client as an async context manager so connection setup and teardown are handled for you, o… Extend agents with skills Claude Code CLI · in the page agent-sdk/skills …allowed_tools=["Read", "Write", "Bash"], ) async for message in query( prompt="Help me process this PDF document", options=options ): print(message) asyncio.run(… Stream responses in real-time Claude Code CLI · in the page agent-sdk/streaming-output …alls stream in By default, the Agent SDK yields a complete `AssistantMessage` for each non-empty content block, such as a text block or a tool call, after Claude finishes generating that block. To re… Streaming Input Claude Code CLI · in the page agent-sdk/streaming-vs-single-mode …*Streaming Input Mode**: a persistent, interactive session * **Single Message Input**: one-shot queries that use session state and resuming ## Streaming Input Mode (Recommended) Streaming input mode… Get structured output from agents Claude Code CLI · in the page agent-sdk/structured-outputs …`output_format` option (Python). When the agent finishes, the result message includes a `structured_output` field with validated data matching your schema. Before running the examples on this page,… Subagents in the SDK Claude Code CLI · in the page agent-sdk/subagents …diate tool calls and results stay inside the subagent; only its final message returns to the parent. A `research-assistant` subagent can explore dozens of files without any of that content accumulatin… Track todos Claude Code CLI · in the page agent-sdk/todo-tracking …, updating each item's status as it works. You see each change in the message stream as a structured tool call. Opt a session in only when your application reads those tool calls, whether to log task… Scale to many tools with tool search Claude Code CLI · in the page agent-sdk/tool-search …e they stay available for subsequent turns until the SDK compacts the messages where the agent discovered them. After that compaction, the agent searches for those tools again when it next needs them.… Troubleshoot the Agent SDK Claude Code CLI · in the page agent-sdk/troubleshooting …ts.md#troubleshooting) | | Checkpointing options not recognized, user messages without UUIDs, `No file checkpoint found`, `File rewinding is not enabled`, `ProcessTransport is not ready for writing` |… Agent SDK reference - TypeScript Claude Code CLI · in the page agent-sdk/typescript …t-sdk"; const cliPath = extractFromBunfs(binPath); for await (const message of query({ prompt: "Hello", options: { pathToClaudeCodeExecutable: cliPath }, })) { console.log(message); } ``` `ex… TypeScript SDK V2 session API (removed) Claude Code CLI · in the page agent-sdk/typescript-v2-preview …s/en/agent-sdk/sessions.md) it accepts. Pass an `AsyncIterable<SDKUserMessage>` for multi-turn conversations, or `options.resume` to continue a saved session. This page is kept for reference if you ma… Handle approvals and user input Claude Code CLI · in the page agent-sdk/user-input …rmal conversation turns where Claude finishes and waits for your next message. For clarifying questions, Claude generates the questions and options. Your role is to present them to users and return t…
Feedback