advisor-tool changedagents-and-tools/tool-use/advisor-tool
Nearest release: v2.1.309, published 13 hours before this site recorded the change. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.
Recorded here
Lines+6added
Lines−6removed
From line
300
where the diff opens
First seen
14 Aug 2026
this site's first read of the page
Recorded edits24to this page, all time
The whole hunk
from line 300, old and new numbered
/
from line 300
300300
301301When the advisor is called, a `server_tool_use` block is followed by an `advisor_tool_result` block in the assistant's content. The following example shows the plaintext `advisor_result` variant returned by a Claude Opus 4.8 advisor. The [Quick start](https://platform.claude.com/docs/en/agents-and-tools/tool-use/advisor-tool#quick-start) uses Claude Opus 5.5, which returns the encrypted `advisor_redacted_result` variant instead; see [Result variants](https://platform.claude.com/docs/en/agents-and-tools/tool-use/advisor-tool#result-variants) for both shapes side by side.
302302
303```text
303```json
304304{
305305 "role": "assistant",
306306 "content": [
from line 349
349349
350350With `"model": "claude-opus-4-8"`, the advice is plaintext:
351351
352```text
352```json
353353{
354354 "type": "advisor_tool_result",
355355 "tool_use_id": "srvtoolu_abc123",
from line 362
362362
363363With `"model": "claude-opus-5-5"`, the advice is encrypted:
364364
365```text
365```json
366366{
367367 "type": "advisor_tool_result",
368368 "tool_use_id": "srvtoolu_abc123",
from line 383
383383
384384If the advisor call fails, the result carries an error:
385385
386```text wrap
386```json
387387{
388388 "type": "advisor_tool_result",
389389 "tool_use_id": "srvtoolu_abc123",
from line 1250
12501250
12511251Advisor calls run as a separate sub-inference billed at the advisor model's rates. Usage is reported in the `usage.iterations[]` array:
12521252
1253```text wrap
1253```json
12541254{
12551255 "usage": {
12561256 "input_tokens": 1760,
from line 1777
17771777
17781778When the advisor does hit the cap, the result block carries `stop_reason: "max_tokens"` on both [result variants](https://platform.claude.com/docs/en/agents-and-tools/tool-use/advisor-tool#result-variants), whichever advisor model you use. Use `stop_reason` to detect truncated advice and decide whether to raise the cap or let the executor proceed with partial guidance. The API also appends `[Advisor output truncated at max_tokens=2048.]` (naming your cap) to the advice text, so the executor receives the truncation notice in its own context; with a plaintext `advisor_result` advisor that marker is visible to your client as well. Both signals appear only when you set `max_tokens` on the tool definition.
17791779
1780```text
1780```json
17811781{
17821782 "type": "advisor_tool_result",
17831783 "tool_use_id": "srvtoolu_abc123",
No line in this hunk matches that.