1,063 pages for prompt.
Titles and paths first, then pages whose text carries it. Each row opens that page as this site last read it.
reduce-hallucinations
Claude Developer Platform · in the page
test-and-evaluate/strengthen-guardrails/reduce-hallucinations
…sumptions. * **Best-of-N verification:** Run Claude through the same prompt multiple times and compare the outputs. Inconsistencies across outputs could indicate hallucinations. * **Iterative refine…
reduce-latency
Claude Developer Platform · in the page
test-and-evaluate/strengthen-guardrails/reduce-latency
…latency by choosing a faster model such as Claude Haiku 5.5, trimming prompt and output tokens, and streaming responses. --- Latency refers to the time it takes for the model to process a prompt and…
Use Claude Code with a screen reader
Claude Code CLI · in the page
accessibility
…aude Code waits after the confirmation line before it draws the first prompt in screen reader mode. Requires Claude Code v2.1.217 or later. | | [`CLAUDE_AX_PREPARK_MS`](https://code.claude.com/docs/en…
Set up Claude Code for your organization
Claude Code CLI · in the page
admin-setup
…cloud provider plans, Anthropic doesn't train models on your code or prompts. Your API provider determines retention and compliance posture. | Topic | What to know | Where to start | | :- | :- | :-…
Escalate hard decisions with the advisor tool
Claude Code CLI · in the page
advisor
…riven rather than rule-based. You can ask for a consultation in your prompt the same way you would request any tool, for example `consult the advisor before you continue`. There is no setting to cap…
How the agent loop works
Claude Code CLI · in the page
agent-sdk/agent-loop
…/en/how-claude-code-works.md#the-agentic-loop): Claude evaluates your prompt, calls tools to take action, receives the results, and repeats until the task is complete. This page explains what happens…
Use Claude Code features in the SDK
Claude Code CLI · in the page
agent-sdk/claude-code-features
…t asyncio async def main(): async for message in query( prompt="Help me refactor the auth module", options=ClaudeAgentOptions( # "user" loads from ~/.claude/, "projec…
Configure your agent
Claude Code CLI · in the page
agent-sdk/configuration
…nthropic-ai/claude-agent-sdk"; for await (const message of query({ prompt: "Summarize the open TODOs in this repo", options: { model: "claude-sonnet-5", allowedTools: ["Read", "Glob", "Gr…
Track cost and usage
Claude Code CLI · in the page
agent-sdk/cost-tracking
…sage > Learn how to track token usage, estimate costs, and configure prompt caching with the Claude Agent SDK. The Claude Agent SDK provides detailed token usage information for each interaction wit…
Give Claude custom tools
Claude Code CLI · in the page
agent-sdk/custom-tools
…g-convention) in `allowedTools` so the tool runs without a permission prompt. That name is `mcp__{server_name}__{tool_name}`, where `{server_name}` is the key you give the server in `mcpServers`. If t…
Rewind file changes with checkpointing
Claude Code CLI · in the page
agent-sdk/file-checkpointing
…thon) when you need to restore. The examples in this section use the prompt "Refactor the authentication module". Run them in a project that contains an authentication module, or change the prompt to…
Intercept and control agent behavior with hooks
Claude Code CLI · in the page
agent-sdk/hooks
…the operation return {}; }; for await (const message of query({ prompt: "Create a .env file with the standard local development database configuration", options: { hooks: { // Regist…
Hosting the Agent SDK
Claude Code CLI · in the page
agent-sdk/hosting
…nthropic-ai/claude-agent-sdk"; for await (const message of query({ prompt: "Summarize the files in this directory", options: { cwd: "/work/session-a" }, })) { console.log(message); } ``` ```py…
Connect to external tools with MCP
Claude Code CLI · in the page
agent-sdk/mcp
…nthropic-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: { "claude-code-docs…
Migrate to Claude Agent SDK
Claude Code CLI · in the page
agent-sdk/migration-guide
…del="claude-opus-4-7", permission_mode="acceptEdits") ``` ### System prompt no longer default **What changed:** The SDK no longer uses Claude Code's system prompt by default. **Migration:** ```typ…
Observability with OpenTelemetry
Claude Code CLI · in the page
agent-sdk/observability
…rics for token and cost counters, and emits structured log events for prompts and tool results. The SDK does not produce telemetry of its own. Instead, it passes configuration through to the CLI proce…
Agent SDK overview
Claude Code CLI · in the page
agent-sdk/overview
…, [Memory](https://code.claude.com/docs/en/agent-sdk/modifying-system-prompts.md), [Configuration loading](https://code.claude.com/docs/en/agent-sdk/claude-code-features.md) | | Plugins | Package skil…
Configure permissions
Claude Code CLI · in the page
agent-sdk/permissions
…Ask` mode both cases are denied instead, because that mode turns each prompt into a denial. The MCP annotation requires Claude Code v2.1.199 or later. [claude.ai connector](https://code.claude.com/do…
Plugins in the SDK
Claude Code CLI · in the page
agent-sdk/plugins
…nthropic-ai/claude-agent-sdk"; for await (const message of query({ prompt: "Hello", options: { plugins: [ { type: "local", path: "./my-plugin" }, { type: "local", path: "/absolute…
Agent SDK reference - Python
Claude Code CLI · in the page
agent-sdk/python
…sdk/sessions.md). ```python theme={null} async def query( *, prompt: str | AsyncIterable[dict[str, Any]], options: ClaudeAgentOptions | None = None, transport: Transport | None = None…
Quickstart
Claude Code CLI · in the page
agent-sdk/quickstart
…eams messages as Claude works async for message in query( prompt="Review utils.py for bugs that would cause crashes. Fix any issues you find.", options=ClaudeAgentOptions(…
Securely deploying AI agents
Claude Code CLI · in the page
agent-sdk/secure-deployment
…hey process: files, webpages, or user input. This is sometimes called prompt injection. For example, if a repository's README contains unusual instructions, Claude Code might incorporate those into it…
Persist sessions to external storage
Claude Code CLI · in the page
agent-sdk/session-storage
…: string | undefined; try { for await (const message of query({ prompt: "List the TypeScript files under src/", options: { sessionStore: store }, })) { if (message.type === "result") {…
Work with sessions
Claude Code CLI · in the page
agent-sdk/sessions
…history the SDK accumulates while your agent works. It contains your prompt, every tool call the agent made, every tool result, and every response. The SDK writes it to disk automatically so you can…
Extend agents with skills
Claude Code CLI · in the page
agent-sdk/skills
…er-invoked**: you dispatch a skill directly by sending `/<name>` in a prompt. See [Commands in Agent SDK sessions](#commands-in-agent-sdk-sessions) * **Scoped via the `skills` option**: discovered ski…
Stream responses in real-time
Claude Code CLI · in the page
agent-sdk/streaming-output
…allowed_tools=["Bash", "Read"], ) async for message in query(prompt="List the files in my project", options=options): if isinstance(message, StreamEvent): event = message.…
Streaming Input
Claude Code CLI · in the page
agent-sdk/streaming-vs-single-mode
…// Process streaming responses for await (const message of query({ prompt: generateMessages(), options: { maxTurns: 10, allowedTools: ["Read", "Grep"] } })) { if (message.type === "re…
Get structured output from agents
Claude Code CLI · in the page
agent-sdk/structured-outputs
…e structure you need, and the SDK validates the output against it, re-prompting on mismatch. If validation does not succeed within the retry limit, the result is an error instead of structured data; s…
Subagents in the SDK
Claude Code CLI · in the page
agent-sdk/subagents
…and apply specialized instructions without adding to the main agent's prompt. ## Overview You can create subagents in three ways: * **Programmatically**: use the `agents` parameter in your `query()…
Track todos
Claude Code CLI · in the page
agent-sdk/todo-tracking
…rmission setup and exit behavior: * **Permission mode**: the example prompts ask Claude to do real work on a project, so each example sets `permissionMode: "acceptEdits"` (TypeScript) or `permission_…
Scale to many tools with tool search
Claude Code CLI · in the page
agent-sdk/tool-search
…i/claude-agent-sdk"; try { for await (const message of query({ prompt: "Find and run the appropriate database query", options: { mcpServers: { "enterprise-tools": {…
Troubleshoot the Agent SDK
Claude Code CLI · in the page
agent-sdk/troubleshooting
…t applied, session hooks not available in Python, subagent permission prompts multiplying, recursive hook loops with subagents, `systemMessage` not appearing in output | [Fix common issues](https://co…
Agent SDK reference - TypeScript
Claude Code CLI · in the page
agent-sdk/typescript
…h = extractFromBunfs(binPath); for await (const message of query({ prompt: "Hello", options: { pathToClaudeCodeExecutable: cliPath }, })) { console.log(message); } ``` `extractFromBunfs()` cop…
TypeScript SDK V2 session API (removed)
Claude Code CLI · in the page
agent-sdk/typescript-v2-preview
…unstable_v2_createSession`, `unstable_v2_resumeSession`, `unstable_v2_prompt`, and the `SDKSession` and `SDKSessionOptions` types. > > To migrate, use the [`query()` API](https://code.claude.com/docs/…
Handle approvals and user input
Claude Code CLI · in the page
agent-sdk/user-input
…async def handle_tool_request(tool_name, input_data, context): # Prompt user and return allow or deny ... options = ClaudeAgentOptions(can_use_tool=handle_tool_request) ``` ```typescript T…
Orchestrate teams of Claude Code sessions
Claude Code CLI · in the page
agent-teams
…tural language. Claude spawns them and coordinates work based on your prompt. This example works well because the three roles are independent and can explore the problem without waiting on each other…
Manage multiple agents with agent view
Claude Code CLI · in the page
agent-view
…the next time you open agent view. **2. Dispatch a session** Type a prompt describing a task and press `Enter`. A new background session starts on that task and appears as a row showing whether it's…
Claude Code on Amazon Bedrock
Claude Code CLI · in the page
amazon-bedrock
…t Claude Code and choose Amazon Bedrock** Run `claude`. At the login prompt, select **3rd-party platform**, then **Amazon Bedrock**. If you're already signed in and see the chat prompt instead, run `…
Track team usage with analytics
Claude Code CLI · in the page
analytics
…ou find team members with high Claude Code adoption who can: * Share prompting techniques and workflows with the team * Provide feedback on what's working well * Help onboard new users #### Access d…
Share session output as artifacts
Claude Code CLI · in the page
artifacts
…e someone opens it See [What you can build](#what-you-can-build) for prompts that match these, and [Pull live data with MCP connectors](#pull-live-data-with-mcp-connectors) for the connector-backed b…
Authentication
Claude Code CLI · in the page
authentication
…st launch, except in cases such as these, where it can skip the login prompt: * **API key**: you've set the `ANTHROPIC_API_KEY` environment variable and you approve the key when Claude Code asks whet…
Auto mode classifier request charges
Claude Code CLI · in the page
auto-mode-classifier-billing
…o mode](https://code.claude.com/docs/en/permission-modes.md#eliminate-prompts-with-auto-mode), a classifier checks actions such as shell commands and network requests before they run. Wherever [server…
Configure auto mode
Claude Code CLI · in the page
auto-mode-config
…o mode](https://code.claude.com/docs/en/permission-modes.md#eliminate-prompts-with-auto-mode) lets Claude Code run without routine permission prompts by routing tool calls through a classifier that bl…
Best practices for Claude Code
Claude Code CLI · in the page
best-practices
…Claude Code is built in a way that, in most cases, your first plain prompt in a fresh session already does the right thing, without any setup on your part. For example: * To let commands run safel…
Champion kit
Claude Code CLI · in the page
champion-kit
…| Why it matters | | - | - | - | | Share what you discover | Post the prompts, screenshots, and small wins from your own work in the places your team already reads, such as an engineering channel, a s…
Claude Code changelog
Claude Code CLI · in the page
changelog
…ll command to the background after 3 minutes on all providers, so the prompt cache doesn't expire while it runs * Changed subagent progress summaries on Bedrock, Vertex, Foundry, or with telemetry off…
Push events into a running session with channels
Claude Code CLI · in the page
channels
…ude Code by running `claude` in your terminal, then enter this at its prompt: > > ``` > /plugin install telegram@claude-plugins-official > ``` > > If the install fails, match the message Claude Code r…
Channels reference
Claude Code CLI · in the page
channels-reference
…annel with a trusted sender path can also opt in to [relay permission prompts](#relay-permission-prompts) so you can approve or deny tool use remotely. This page covers: * [Overview](#overview): how…
Checkpointing
Claude Code CLI · in the page
checkpointing
…eckpointing automatically captures the state of your code before each prompt you send that starts a turn. ### Automatic tracking Claude Code tracks all changes made by its file editing tools: * Eve…
Use Claude Code with Chrome
Claude Code CLI · in the page
chrome
…laude uses. When a browser action starts before you've chosen, Claude prompts you to pick one. To switch browsers later, run `/chrome` and select **Select browser…**. Claude keeps using your choice ev…