The memorizable facts, condensed. Everything here is original material summarizing
Anthropic's public documentation — verify details against
platform.claude.com/docs
before relying on them in production.
Current models checked Oct 28, 2026
| Model | API ID | Thinking | Default effort | $ / MTok in · out |
| Claude Fable 5.1 | claude-fable-5-1 | Adaptive, always on | high | 10 · 50 |
| Claude Opus 5.5 | claude-opus-5-5 | Adaptive, always on | medium | 4 · 20 |
| Claude Sonnet 5.5 | claude-sonnet-5-5 | Adaptive | high | 2 · 10 |
| Claude Haiku 5.5 | claude-haiku-5-5 | Adaptive | medium | from 0.10 · 0.50 |
All four: 1M-token context, 128K max output. Anthropic's default pick is Opus 5.5; Fable 5.1 is
for the hardest reasoning and long-horizon agent work. Older models (Opus 5, Sonnet 5, the 4.x
family) are still served. Source:
models overview.
Changed in 2026
| Change | Where | Do this instead |
thinking: {type: "enabled", budget_tokens} not accepted | Models after Opus 4.6 / Sonnet 4.6 (deprecated on those two) | Adaptive thinking + output_config.effort |
Effort levels low · medium · high · xhigh · max | Current models; default differs per model (table above) | Set effort explicitly instead of trusting the default |
thinking: {type: "disabled"} → 400 | Fable 5.1, Opus 5.5, Sonnet 5.5 | Lower effort; on Sonnet 5.5, {type: "between_tools"} turns off up-front thinking |
tool_choice any / tool → 400 | Opus 5.5, Sonnet 5.5, Fable 5.1, Mythos 5.1 | auto + an instruction naming the tool, strict: true, or structured outputs |
| Last-assistant-turn prefill → 400 | Opus 4.6, Sonnet 4.6 and every later model | Structured outputs (output_config.format) or a system-prompt instruction |
temperature, top_p, top_k removed → 400 | Every model on API version 2026-10-21 | Ask for variety in the prompt |
output_format deprecated | Messages API | output_config: {format: …} |
refusal carries stop_details.category | Opus 4.7 and later | Check stop_reason before reading content; optional server-side fallbacks |
Check a tools array against these rules with the
Claude Tool Schema Validator. Sources:
define tools,
API versions.
Stop reasons
| stop_reason | Meaning / action |
end_turn | Finished naturally — exit the agent loop. |
tool_use | Execute requested tool(s), return tool_result blocks in one user message. |
pause_turn | Server-side tool loop paused — append assistant content, re-send; server resumes. |
max_tokens | Output cap hit — raise max_tokens or stream. |
model_context_window_exceeded | Conversation too large — compact or trim. |
stop_sequence | A custom stop string fired. |
refusal | Declined for safety — read stop_details.category, surface it, don't blind-retry. |
tool_choice
| Value | Behavior |
auto | Claude decides (default). |
any | Must use at least one tool. 400 on Opus 5.5, Sonnet 5.5, Fable 5.1, Mythos 5.1. |
tool + name | Must use that specific tool. Same 400 on those four models. |
none | Tools visible, never called. |
disable_parallel_tool_use: true | Add to any value → max one call per response. |
HTTP errors
| Code | Type | Retry? |
| 400 | invalid_request_error | No — fix the request |
| 401 | authentication_error | No — fix the key |
| 403 | permission_error | No |
| 404 | not_found_error (often a model-ID typo) | No |
| 413 | request_too_large | No — shrink input |
| 429 | rate_limit_error | Yes — honor retry-after |
| 500 | api_error | Yes — backoff |
| 529 | overloaded_error | Yes — backoff |
SDKs auto-retry 429/5xx with exponential backoff. Use typed exception classes, not string matching.
Prompt caching
| Fact | Value |
| Mechanism | Exact prefix match on rendered bytes — one changed byte invalidates everything after it |
| Render order | tools → system → messages |
| Max breakpoints | 4 per request |
| TTL | 5 min default, 1 h optional |
| Write cost | ≈1.25× base (5 min) / 2× (1 h) |
| Read cost | 0.1× base input (0.05× on Opus 5.5 and Sonnet 5.5, 0.025× on Fable 5.1) |
| Verify | usage.cache_read_input_tokens > 0 |
| Classic invalidators | timestamps/UUIDs in system prompt, unsorted JSON, varying tool set, model switch |
Batches & tokens
| Fact | Value |
| Batches discount | 50% off all token usage |
| Batch window | Most < 1 h, max 24 h; results kept 29 days |
| Token counting | count_tokens endpoint with your inference model — never tiktoken |
| Large outputs | Stream anything big — buffered requests hit HTTP timeouts |
Claude Code files
| Path | Purpose |
CLAUDE.md (root) | Project memory, committed, team-shared; nested ones scope a subtree; @path imports files |
~/.claude/CLAUDE.md | Personal memory, all projects |
.claude/settings.json | Project settings, committed |
.claude/settings.local.json | Personal overrides, git-ignored |
.claude/commands/*.md | Project slash commands |
.claude/agents/ | Custom subagent definitions |
.mcp.json | Project-scoped MCP servers, committed |
Hook events
| Event | Fires |
PreToolUse | Before a tool call — can block or modify it |
PostToolUse | After a tool call completes |
UserPromptSubmit | When the user submits a prompt |
SessionStart | New session begins |
Stop | Claude finishes responding |
Deterministic "every time X" rules → hooks. Conventions and context → CLAUDE.md.
MCP at a glance
| Concept | Definition |
| Host | The app (IDE, chat client) embedding MCP clients |
| Client | Maintains one connection to one server |
| Server | Exposes capabilities |
| Tools | Model-invoked actions (side effects allowed) |
| Resources | Application-controlled data/context |
| Prompts | User-invoked templates |
| Transports | stdio (local) · streamable HTTP (remote) |
| Remote auth | OAuth at the client/host layer — never secrets in prompts |
Independent community study resource — not affiliated with or endorsed by Anthropic. Claude is a trademark of Anthropic, PBC. All study material and practice questions here are original, written from Anthropic's public documentation. Everything runs in your browser; nothing you answer is stored or transmitted.