Sonnet 5 prompting focuses on using effort to control reasoning and cost first, then explicitly defining the task scope, tool-trigger conditions, and code-review phases.
Suitable tasks: multi-step coding agents, tool calls, code review, structured extraction, and interactive frontend design.
Unsuitable tasks: migration approaches that rely on temperature/top_p/top_k to adjust style, or on manually configured extended thinking parameters from older versions.
Applicable model version: Claude Sonnet 5 (the documentation does not provide an API snapshot ID for the model).
Applicable client, agent, or API: Claude API, Claude Code, and a custom tool-calling harness.
Recommended reasoning levels and parameters: adaptive thinking by default; medium/low for simple tasks and high/xhigh for difficult coding or agent tasks; reserve sufficient max_tokens for thinking and tool calls. To disable thinking, use thinking: {type: "disabled"}.
Task: [Specify the task, goal, and acceptance criteria]
Context: [Repository, constraints, relevant files, and known facts]
Tools: Call tools only when they can materially improve the result; after each call, check the returned value and continue toward the goal.
Process: Plan first, then implement; for long tasks, continuously verify the goal and perform self-checks.
Output: Provide the changes, verification results, unresolved risks, and next steps.Coverage-first prompt for code review:
Report every issue you find, including ones you are uncertain about or consider low-severity.
Do not filter for importance or confidence at this stage - a separate verification step will do that.
Your goal here is coverage: it is better to surface a finding that later gets filtered out than to silently drop a real bug.
For each finding, include your confidence level and an estimated severity so a downstream filter can rank them.Remove non-default sampling parameters from the API request; establish a baseline with medium first.
Run the same task separately with high and xhigh, recording completion rate, number of tool calls, total tokens, and latency.
For code review, split “discovery” and “verification/deduplication/ranking” into two phases, using the coverage prompt above in the first phase.
For long tasks, increase max_tokens and check whether the final answer was truncated because thinking consumed the entire budget.
Official documentation states that Sonnet 5 enables adaptive thinking by default, with effort defaulting to high; difficult coding and agent tasks can be raised to xhigh.
The documentation explicitly states that manually setting thinking: {type: "enabled", budget_tokens: N} is unsupported, and that non-default temperature, top_p, and top_k values return 400.
The official documentation recommends reducing human back-and-forth for long tasks and providing the task, intent, and constraints all at once in the first turn to improve autonomy and token efficiency.
The code-review section explicitly distinguishes “coverage discovery” from subsequent verification and recommends using a small evaluation set to check recall/F1.
The cost/capability relationship across effort levels must be measured on your own task set; directional recommendations in the documentation should not be treated as a fixed ranking.
The internal process of adaptive thinking cannot be treated as a complete, auditable reasoning record; this note reuses only the externally visible parameter and workflow controls.
The code-review prompt increases the number of candidate issues and must be paired with independent verification and deduplication phases.
Official example: “Provide concise, focused responses.”
The official documentation summarizes Sonnet 5 as a more agent-oriented Sonnet and specifically discusses effort, tool triggering, code review, and computer use.
Claude Sonnet 5