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

571 pages for stop.

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

Batches Claude Developer Platform · in the page api/messages/batches …okens: number` The maximum number of tokens to generate before stopping. Note that our models may stop _before_ reaching this maximum. This parameter only specifies the absolute maximum… Create a Message Batch Claude Developer Platform · in the page api/messages/batches/create …okens: number` The maximum number of tokens to generate before stopping. Note that our models may stop _before_ reaching this maximum. This parameter only specifies the absolute maximum… Retrieve Message Batch results Claude Developer Platform · in the page api/messages/batches/results …ll always be `"assistant"`. default: assistant - `stop_details: RefusalStopDetails or null` Structured information about why model output stopped. This is `nu… Create a Message Claude Developer Platform · in the page api/messages/create …ax_tokens: number` The maximum number of tokens to generate before stopping. Note that our models may stop _before_ reaching this maximum. This parameter only specifies the absolute maximum numb… spans Claude Developer Platform · in the page api/opentelemetry/spans …| | `anthropic.message.stop_reason` | `string` | The response's [`stop_reason`](https://platform.claude.com/docs/en/api/messages#stop_reason… Organization Claude Developer Platform · in the page api/organization …=http). Archive a federation rule. Token exchange through this rule stops immediately. Idempotent; re-archiving returns the rule with its original `archived_at`. Archiving clears the rule's workspac… Federation Claude Developer Platform · in the page api/organization/federation …=http). Archive a federation rule. Token exchange through this rule stops immediately. Idempotent; re-archiving returns the rule with its original `archived_at`. Archiving clears the rule's workspac… Rules Claude Developer Platform · in the page api/organization/federation/rules …=http). Archive a federation rule. Token exchange through this rule stops immediately. Idempotent; re-archiving returns the rule with its original `archived_at`. Archiving clears the rule's workspac… Archive Federation Rule Claude Developer Platform · in the page api/organization/federation/rules/archive …=http). Archive a federation rule. Token exchange through this rule stops immediately. Idempotent; re-archiving returns the rule with its original `archived_at`. Archiving clears the rule's workspac… Service Accounts Claude Developer Platform · in the page api/organization/service_accounts …ch an active membership returns a 400 invalid-request error. A cursor stops matching when the membership is removed, the workspace is deleted, or the service account is archived. Restart pagination fr… Workspaces Claude Developer Platform · in the page api/organization/service_accounts/workspaces …ch an active membership returns a 400 invalid-request error. A cursor stops matching when the membership is removed, the workspace is deleted, or the service account is archived. Restart pagination fr… List Workspaces For Service Account Claude Developer Platform · in the page api/organization/service_accounts/workspaces/list …ch an active membership returns a 400 invalid-request error. A cursor stops matching when the membership is removed, the workspace is deleted, or the service account is archived. Restart pagination fr… rate-limits Claude Developer Platform · in the page api/rate-limits …e-platform-on-aws):** The same monthly spend caps apply, and requests stop at the cap in the same way. Billing and tier increases work differently; see [Spend limits on Claude Platform on AWS](https:/… User Profiles Claude Developer Platform · in the page api/user_profiles …user_profile_action_url`. - `expires_at: string` When the URL stops working, in RFC 3339 format. format: date-time - `url: string` The URL to give to the person who takes the acti… Action URLs Claude Developer Platform · in the page api/user_profiles/action_urls …user_profile_action_url`. - `expires_at: string` When the URL stops working, in RFC 3339 format. format: date-time - `url: string` The URL to give to the person who takes the acti… Create Action URL Claude Developer Platform · in the page api/user_profiles/action_urls/create …user_profile_action_url`. - `expires_at: string` When the URL stops working, in RFC 3339 format. format: date-time - `url: string` The URL to give to the person who takes the acti… Message Batches API Claude Developer Platform · in the page build-with-claude/batch-processing …hing specific you'd like to chat about or any questions you have?"}],"stop_reason":"end_turn","stop_sequence":null,"usage":{"input_tokens":11,"output_tokens":36}}}} {"custom_id":"my-first-request","re… citations Claude Developer Platform · in the page build-with-claude/citations …... }}} event: content_block_stop data: {"type": "content_block_stop", "index": 0} event: message_stop data: {"type": "message_stop"} ``` </… claude-in-microsoft-foundry Claude Developer Platform · in the page build-with-claude/claude-in-microsoft-foundry …error) { token, err := credential.GetToken(ctx, policy.TokenRequestOptions{ Scopes: []string{foundry.EntraIDScope}, }) return token.Token, err } client, err := foundry.NewClie… claude-platform-on-aws Claude Developer Platform · in the page build-with-claude/claude-platform-on-aws …overshoot is billed. When the tier cap or an organization spend limit stops your requests, an email notice goes to the recipients listed under **Email recipients** on the **Billing** page. Role-based… sent_count = len(messages sent in the compaction request) Claude Developer Platform · in the page build-with-claude/compaction …ponse. When enabled, the API returns a message with the `compaction` stop reason after generating the compaction block: <CodeGroup> ```bash cURL # pause_after_compaction stops the response right… compaction-background Claude Developer Platform · in the page build-with-claude/compaction-background …s one is swapped in or has failed. 3. When the response arrives with `stop_reason` `"compaction"`, drop exactly the messages you sent from the front of your history and put the returned message in the… compaction-keep-recent-turns Claude Developer Platform · in the page build-with-claude/compaction-keep-recent-turns …compaction={"type": "summarize"}, ) if summary.stop_reason == "compaction": history = [{"role": "assistant", "content": summary.content}, *recent] pr… compaction-on-demand Claude Developer Platform · in the page build-with-claude/compaction-on-demand …once, generates no reply after it, and returns the block alone with `stop_reason` `"compaction"`. Send the same `system` prompt and `tools` that you use for the rest of the conversation. The summariz… compaction-thinking-blocks Claude Developer Platform · in the page build-with-claude/compaction-thinking-blocks …e the summarized turns are summarized too, so their text instructions stop applying after the swap. A [per-message effort](https://platform.claude.com/docs/en/build-with-claude/effort#change-effort-mi… compaction-threshold Claude Developer Platform · in the page build-with-claude/compaction-threshold …ponse. When enabled, the API returns a message with the `compaction` stop reason after generating the compaction block: <CodeGroup> ```bash cURL # pause_after_compaction stops the response right… context-editing Claude Developer Platform · in the page build-with-claude/context-editing …treaming Response wrap { "type": "message_delta", "delta": { "stop_reason": "end_turn", "stop_sequence": null }, "usage": { "output_tokens": 1024 }, "context_management": {… context-windows Claude Developer Platform · in the page build-with-claude/context-windows …the request. If generation then reaches the context window limit, it stops with `stop_reason: "model_context_window_exceeded"`. On earlier models, the API returns a [validation error](https://platfor… effort Claude Developer Platform · in the page build-with-claude/effort …ts. In long agent prompts, the model is more likely to skip a search, stop early, or skip a check at `low`. Use `high` for knowledge work, longer agent tasks, and strict instruction following. Use `xh… extended-thinking Claude Developer Platform · in the page build-with-claude/extended-thinking …strict cap. Actual token usage varies with the task, and Claude might stop reasoning well before the budget is exhausted; `max_tokens` remains the hard ceiling on total output. On Claude Opus 4.5, th… fallback-credit Claude Developer Platform · in the page build-with-claude/fallback-credit …<Step title="Read two fields from the refusal"> On a refusal, `stop_details` includes two fields: * **`fallback_credit_token`:** an opaque string that represents the credit * **`fallba… fast-mode Claude Developer Platform · in the page build-with-claude/fast-mode …back( params: Anthropic.MessageCreateParamsNonStreaming, requestOptions?: Anthropic.RequestOptions, maxAttempts: number = 3 ): Promise<Anthropic.Message> { try { return await c… mid-conversation-effort-example Claude Developer Platform · in the page build-with-claude/mid-conversation-effort-example …import com.anthropic.core.JsonValue; import com.anthropic.core.RequestOptions; import com.anthropic.helpers.MessageAccumulator; import com.anthropic.models.messages.ContentBlockParam; import c… mid-conversation-system-messages Claude Developer Platform · in the page build-with-claude/mid-conversation-system-messages …aused](https://platform.claude.com/docs/en/build-with-claude/handling-stop-reasons#pause-turn) assistant turn after the message, or a server-side tool loop, adds no user message, so the message still… pdf-support Claude Developer Platform · in the page build-with-claude/pdf-support …pdated evaluation results. The key findings include..." } ], "stop_reason": "end_turn", "usage": { "input_tokens": 45000, "output_tokens": 300 } } ``` #### Option 2: Base64-encode… preserved-thinking Claude Developer Platform · in the page build-with-claude/preserved-thinking …where later turns build on earlier reasoning. Use `"drop_block"` as a stopgap while you fix the edit, but not as a long-term setting. </Warning> Count the responses in each session whose `input_trans… Request 2 caches its request content (not the response) Claude Developer Platform · in the page build-with-claude/prompt-caching …first. If the system finds no matching entry in that window, checking stops (or resumes from the next explicit breakpoint, if any). On the Claude API, a run of consecutive `tool_use` blocks counts as… claude-prompting-best-practices Claude Developer Platform · in the page build-with-claude/prompt-engineering/claude-prompting-best-practices …ku 4.5: effort levels, search, JSON output with your own tools, early stopping in long agent prompts, verification on coding tasks, mid-turn user messages, system prompt adherence in chatbots, and saf… prompting-claude-fable-5 Claude Developer Platform · in the page build-with-claude/prompt-engineering/prompting-claude-fable-5 …n/build-with-claude/thinking#configuring-thinking). For the `refusal` stop reason and fallback handling, see [Refusals and fallback](https://platform.claude.com/docs/en/build-with-claude/refusals-and-… Delivering work Claude Developer Platform · in the page build-with-claude/prompt-engineering/prompting-claude-fable-5-1 …5-1#search-triggering-at-low-effort) * Benign coding requests return `stop_reason: "refusal"`: [Reduce safeguard false positives](https://platform.claude.com/docs/en/build-with-claude/prompt-engineeri… prompting-claude-haiku-5-5 Claude Developer Platform · in the page build-with-claude/prompt-engineering/prompting-claude-haiku-5-5 …ude Haiku 5.5: effort, search, JSON output with your own tools, early stopping, coding verification, mid-turn user messages, system prompt adherence in chatbots, reasoning in user-facing text, and ref… prompting-claude-opus-5 Claude Developer Platform · in the page build-with-claude/prompt-engineering/prompting-claude-opus-5 …y narrowing, widening, or transforming it. Finish the whole task, and stop short of actions that are clearly beyond what was asked. ``` ## Controlling subagent spawning Claude Opus 5 delegates to su… prompting-claude-opus-5-5 Claude Developer Platform · in the page build-with-claude/prompt-engineering/prompting-claude-opus-5-5 …opus-5-5#prompts-written-for-thinking-disabled) * An unattended agent stops partway through a long task after reporting progress: [Unattended agentic runs](https://platform.claude.com/docs/en/build-wi… prompting-claude-sonnet-5 Claude Developer Platform · in the page build-with-claude/prompt-engineering/prompting-claude-sonnet-5 …that is almost entirely thinking followed by a truncated answer and `stop_reason: "max_tokens"`. Raising `max_tokens` or dropping to `medium` effort resolves this. Because Claude Sonnet 5 uses a new… prompting-claude-sonnet-5-5 Claude Developer Platform · in the page build-with-claude/prompt-engineering/prompting-claude-sonnet-5-5 …engineering/prompting-claude-sonnet-5-5#calibrate-effort) * The model stops to check in before a coding task is done, or does more than you asked: [Steer initiative and scope](https://platform.claude.… refusals-and-fallback Claude Developer Platform · in the page build-with-claude/refusals-and-fallback …When that happens, you receive a normal response, not an error, with `stop_reason: "refusal"`. Its `stop_details.category` names the policy area (see [What a refusal looks like](https://platform.claud… search-results Claude Developer Platform · in the page build-with-claude/search-results …-guardrails/handle-streaming-refusals"> Detect and handle refusal stop reasons in streaming responses, and retry refused requests on a fallback model. </Card> <Card title="Citations" icon="bo… skills-guide Claude Developer Platform · in the page build-with-claude/skills-guide …t perform operations that require multiple turns. Handle `pause_turn` stop reasons: <CodeGroup exclude="shell:cURL, shell:CLI"> <CodeGroupItem language="cURL"> This workflow needs more logic th… streaming Claude Developer Platform · in the page build-with-claude/streaming …data. Each event uses an SSE event name (for example, `event: message_stop`), and includes the matching event `type` in its data. Each stream uses the following event flow: 1. `message_start`: conta… structured-outputs Claude Developer Platform · in the page build-with-claude/structured-outputs …the tool first (tool_use) or respond with JSON (text) console.log("Stop reason:", response.stop_reason); for (const block of response.content) { switch (block.type) { case "tool_use":…
Feedback