533 pages for pattern.
Titles and paths first, then pages whose text carries it. Each row opens that page as this site last read it.
self-hosted-sandboxes-workers
Claude Developer Platform · in the page
managed-agents/self-hosted-sandboxes-workers
…every session in one process. This page helps you choose a deployment pattern and then covers always-on and webhook-triggered workers. ## Choose a deployment pattern When deploying workers, you need…
configuration-reference
Claude Developer Platform · in the page
managed-agents/self-hosted/configuration-reference
…A list of `group` and `role` pairs. A group matches exactly, or as a pattern in which `*` stands for any run of characters and `?` for one character. A role is `admin`, `developer`, or `user`. The hi…
session-threads
Claude Developer Platform · in the page
managed-agents/session-threads
…`, it sends a `user.tool_confirmation` that allows the call. The same pattern applies to `user.custom_tool_result`, which you can also send as soon as its `agent.custom_tool_use` event arrives. <Code…
tools
Claude Developer Platform · in the page
managed-agents/tools
…rm string replacement in a file | | Glob | `glob` | Perform fast file pattern matching using glob patterns | | Grep | `grep` | Search text using regex patterns | | Web fetch | `web_fetch` | Fetch cont…
tools-web-restrictions
Claude Developer Platform · in the page
managed-agents/tools-web-restrictions
…or `web_search` too. The search provider matches path suffixes as URL patterns rather than as strict host rules. ## Validation errors The API validates these settings when you [create an agent](http…
migration-guide
Claude Developer Platform · in the page
models/fable-5-2/migration-guide
…w-fable-5-2). For behavioral differences and model-specific prompting patterns, see [Prompting Claude Fable 5.2](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/prompting-clau…
overview
Claude Developer Platform · in the page
models/fable-5-2/overview
…prompting-claude-fable-5-2"> Behavioral differences and prompting patterns specific to Claude Fable 5.2. </Card> <Card title="Claude Fable 5.2 migration guide" icon="arrow-right" href="https:…
whats-new-fable-5-2
Claude Developer Platform · in the page
models/fable-5-2/whats-new-fable-5-2
…Mythos 5.1 and from Claude Opus models. For model-specific prompting patterns, see [Prompting Claude Fable 5.2](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/prompting-clau…
overview
Claude Developer Platform · in the page
models/haiku-5-5/overview
…prompting-claude-haiku-5-5"> Behavioral differences and prompting patterns specific to Claude Haiku 5.5. </Card> <Card title="Reduce latency" icon="lightning" href="https://platform.claude.co…
migration-guide
Claude Developer Platform · in the page
models/opus-5-5/migration-guide
…ure-support). For behavioral differences and model-specific prompting patterns, see [Prompting Claude Opus 5.5](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/prompting-claud…
overview
Claude Developer Platform · in the page
models/opus-5-5/overview
…/prompting-claude-opus-5-5"> Behavioral differences and prompting patterns specific to Claude Opus 5.5. </Card> <Card title="Effort" icon="sliders" href="https://platform.claude.com/docs/en/b…
whats-new-opus-5-5
Claude Developer Platform · in the page
models/opus-5-5/whats-new-opus-5-5
…/prompting-claude-opus-5-5"> Behavioral differences and prompting patterns specific to Claude Opus 5.5. </Card> <Card title="Effort" icon="gauge" href="https://platform.claude.com/docs/en/bui…
overview
Claude Developer Platform · in the page
models/sonnet-5-5/overview
…rompting-claude-sonnet-5-5"> Behavioral differences and prompting patterns specific to Claude Sonnet 5.5. </Card> <Card title="Effort" icon="sliders" href="https://platform.claude.com/docs/en…
whats-new-sonnet-5-5
Claude Developer Platform · in the page
models/sonnet-5-5/whats-new-sonnet-5-5
…rompting-claude-sonnet-5-5"> Behavioral differences and prompting patterns specific to Claude Sonnet 5.5. </Card> <Card title="Effort" icon="gauge" href="https://platform.claude.com/docs/en/b…
overview
Claude Developer Platform · in the page
release-notes/overview
…ku-5-5/migration-guide) for each change. For model-specific prompting patterns, see [Prompting Claude Haiku 5.5](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/prompting-clau…
claude-fable-5
Claude Developer Platform · in the page
release-notes/system-prompts/claude-fable-5
…l content about grooming, abuse, or exploitation, Claude stays at the pattern level — naming the behaviors with at most a few illustrative phrases. Claude does not compile categorized lists of verbati…
claude-fable-5-1
Claude Developer Platform · in the page
release-notes/system-prompts/claude-fable-5-1
…l content about grooming, abuse, or exploitation, Claude stays at the pattern level — naming the behaviors with at most a few illustrative phrases. Claude does not compile categorized lists of verbati…
claude-fable-5-2
Claude Developer Platform · in the page
release-notes/system-prompts/claude-fable-5-2
…tes that recreate the sensation or imagery of self-harm reinforce the pattern rather than interrupt it. Claude does not tell someone that self-harm works, helps, or does something for them, even when…
claude-haiku-4-5
Claude Developer Platform · in the page
release-notes/system-prompts/claude-haiku-4-5
…l content about grooming, abuse, or exploitation, Claude stays at the pattern level — naming the behaviors with at most a few illustrative phrases. Claude does not compile categorized lists of verbati…
claude-haiku-5-5
Claude Developer Platform · in the page
release-notes/system-prompts/claude-haiku-5-5
…l content about grooming, abuse, or exploitation, Claude stays at the pattern level — naming the behaviors with at most a few illustrative phrases. Claude does not compile categorized lists of verbati…
claude-opus-5-5
Claude Developer Platform · in the page
release-notes/system-prompts/claude-opus-5-5
…l content about grooming, abuse, or exploitation, Claude stays at the pattern level — naming the behaviors with at most a few illustrative phrases. Claude does not compile categorized lists of verbati…
claude-sonnet-5
Claude Developer Platform · in the page
release-notes/system-prompts/claude-sonnet-5
…l content about grooming, abuse, or exploitation, Claude stays at the pattern level — naming the behaviors with at most a few illustrative phrases. Claude does not compile categorized lists of verbati…
claude-sonnet-5-5
Claude Developer Platform · in the page
release-notes/system-prompts/claude-sonnet-5-5
…l content about grooming, abuse, or exploitation, Claude stays at the pattern level — naming the behaviors with at most a few illustrative phrases. Claude does not compile categorized lists of verbati…
handle-streaming-refusals
Claude Developer Platform · in the page
test-and-evaluate/strengthen-guardrails/handle-streaming-refusals
…riendly messages for better UX when refusals occur. * **Track refusal patterns:** Monitor refusal frequency to identify potential issues with your prompts. ## Migration notes If you’re adding refusa…
mitigate-jailbreaks
Claude Developer Platform · in the page
test-and-evaluate/strengthen-guardrails/mitigate-jailbreaks
…rdion> * **Input validation:** Filter user input for known injection patterns before it reaches Claude. You can use an LLM to create a generalized validation screen by providing known jailbreaking la…
Set up Claude Code for your organization
Claude Code CLI · in the page
admin-setup
…mmon workflows](https://code.claude.com/docs/en/common-workflows.md): patterns for everyday tasks like code review, refactoring, and debugging * [Claude Code 101](https://academy.claude.com/courses/cl…
How the agent loop works
Claude Code CLI · in the page
agent-sdk/agent-loop
…ify, and create files | | **Search** | `Glob`, `Grep` | Find files by pattern, search content with regex | | **Execution** | `Bash` | Run shell commands, scripts, git operations | | **Web** | `WebSear…
Give Claude custom tools
Claude Code CLI · in the page
agent-sdk/custom-tools
…). The [`get_precipitation_chance` tool](#add-more-tools) shows both patterns. ### Call a custom tool To call a custom tool, follow these steps: 1. Pass the MCP server you created to `query` using…
Rewind file changes with checkpointing
Claude Code CLI · in the page
agent-sdk/file-checkpointing
…efore risky operations](#checkpoint-before-risky-operations) for that pattern. If you capture the session ID and checkpoint ID, you can also rewind from the CLI. This command requires the `claude` ex…
Intercept and control agent behavior with hooks
Claude Code CLI · in the page
agent-sdk/hooks
…hers filter which hooks run** If a hook has a [`matcher`](#matchers) pattern (like `"Write|Edit"`), the SDK tests it against the event's target (for example, the tool name). Hooks without a matcher r…
Hosting the Agent SDK
Claude Code CLI · in the page
agent-sdk/hosting
…/code.claude.com/docs/en/agent-sdk/sessions.md). ## Choose a session pattern These four patterns cover session lifecycle: how long a container lives relative to the sessions it serves. For where the…
Modifying system prompts
Claude Code CLI · in the page
agent-sdk/modifying-system-prompts
…ns - Include comprehensive docstrings - Prefer functional programming patterns when appropriate - Always explain your code choices`; const messages = []; for await (const message of query({ prompt…
Observability with OpenTelemetry
Claude Code CLI · in the page
agent-sdk/observability
…| Tool input arguments such as file paths, shell commands, and search patterns on `claude_code.tool_result` events, and real agent, skill, plugin, and MCP server names on the [cost and token metrics](…
Configure permissions
Claude Code CLI · in the page
agent-sdk/permissions
…en/permissions.md#project-allow-rules-and-workspace-trust). ### Path patterns in rules Scoped rules for `Read` and `Edit` take a path pattern. `Edit(path)` rules govern all built-in tools that write…
Agent SDK reference - Python
Claude Code CLI · in the page
agent-sdk/python
…"content": f"Analyze the following sensor data and describe any patterns you see: {data}", }, } async def main(): async with ClaudeSDKClient() as client: # Stream input…
Securely deploying AI agents
Claude Code CLI · in the page
agent-sdk/secure-deployment
…ent can make API calls, but it never sees the credential itself. This pattern is useful for multi-tenant deployments or when processing untrusted content. ### Least privilege When needed, you can re…
Persist sessions to external storage
Claude Code CLI · in the page
agent-sdk/session-storage
…DK](https://code.claude.com/docs/en/agent-sdk/hosting.md): Deployment patterns for multi-host environments * [TypeScript `Options`](https://code.claude.com/docs/en/agent-sdk/typescript#options): Full…
Work with sessions
Claude Code CLI · in the page
agent-sdk/sessions
…review.md), which provided `createSession()` with a `send` / `stream` pattern, was removed in TypeScript Agent SDK 0.3.142. Use the `query()` function and the session options described on this page in…
Extend agents with skills
Claude Code CLI · in the page
agent-sdk/skills
…fresh one-shot `query()` call starts with empty context, so use this pattern in a session with prior turns, for example in [streaming input mode](https://code.claude.com/docs/en/agent-sdk/streaming-v…
Stream responses in real-time
Claude Code CLI · in the page
agent-sdk/streaming-output
…en not in a tool, and tool completion triggers a "done" message. This pattern is useful for chat interfaces that need to show progress during multi-step agent tasks. ```python Python theme={null} fro…
Subagents in the SDK
Claude Code CLI · in the page
agent-sdk/subagents
…y of tool names to remove from the agent's tool set. MCP server-level patterns are also accepted: `mcp__server` or `mcp__server__*` removes every tool from that server, and `mcp__*` removes every MCP…
Troubleshoot the Agent SDK
Claude Code CLI · in the page
agent-sdk/troubleshooting
…en/agent-sdk/structured-outputs.md#error-handling) section shows this pattern for both SDKs. Then check for these causes: * **A request that Claude declined**: to detect this case in your code, check…
Agent SDK reference - TypeScript
Claude Code CLI · in the page
agent-sdk/typescript
…ponses](#handle-slow-or-stalled-api-responses) for an example of this pattern, and [Environment variables](https://code.claude.com/docs/en/env-vars.md) for variables the underlying CLI reads. Set `CLA…
TypeScript SDK V2 session API (removed)
Claude Code CLI · in the page
agent-sdk/typescript-v2-preview
…d V2 TypeScript Agent SDK session API, with session-based send/stream patterns for multi-turn conversations. > [!WARNING] > > The V2 session API is no longer supported. TypeScript Agent SDK 0.3.142 r…
Track team usage with analytics
Claude Code CLI · in the page
analytics
…analytics dashboards to help organizations understand developer usage patterns, track contribution metrics, and measure how Claude Code impacts engineering velocity. Access the dashboard for your plan…
Claude Approvals classifiers
Claude Code CLI · in the page
approvals-classifiers
…on-draft pull request that changes a file matching the rule's `paths` patterns. Look for the classifier's line in one of these places: * **Claude's comment**: under **Classifier results** * **The Cla…
Claude Approvals policy file reference
Claude Code CLI · in the page
approvals-policy
…case. Approvals refuses a file that has an unknown key * **Purposes, patterns, and conditions**: put double quotes around every purpose, `paths` pattern, and condition * **`!` items**: put double quo…
Share session output as artifacts
Claude Code CLI · in the page
artifacts
…two examples; see [What you can build](#what-you-can-build) for more patterns. ```text wrap theme={null} Make an artifact that walks through this PR with the diff annotated inline. ``` ```text wrap…
Configure auto mode
Claude Code CLI · in the page
auto-mode-config
…e-config) include your entries. Entries are prose, not regex or tool patterns. The classifier reads them as natural-language rules. Write them the way you would describe your infrastructure to a new…
Best practices for Claude Code
Claude Code CLI · in the page
best-practices
…oduces it, then fix it"* | | *"add a calendar widget"* | *"follow the pattern in HotDogWidget.php and build a calendar widget that lets you pick a month and page between years. no new libraries"* | I…