Repository navigation
Commit 0843a07
committed
feat(tools): add send_user_message for models that summarize text between tool calls
On Opus 5.5, Fable 5/5.1 and Mythos 5.1, the text the model writes
between tool calls comes back from the API only as a short summary,
under every thinking.display value. Links, paths and numbers the model
put there for the user were lost: the chat showed only a sentence
like
I've got the byte sizes for all 8 files in `files-A/`, ranging from
203 to 1496 bytes. Now I'll list `files-B/`.
where the model had written a list of 8 file links with their sizes.
The raw API dump shows that only this summary and the encrypted
signatures come over the wire, so Zoo cannot recover the original.
The model still sees its full note on later turns, so it doesn't
notice the loss.
Anthropic's prompting guide names the fix as the harness's job:
> if the model may need to hand the user something verbatim partway
> through a long turn, such as a code snippet, give it a simple tool
> for sending the user a message and tell it to reserve the tool for
> that content. Declare the tool in `tools` from the first request of
> the session
- New `send_user_message` tool with a `message` parameter. It shows the
message as assistant text, streaming it while it arrives, and does
not end or pause the turn like attempt_completion and
ask_followup_question do.
- New `ModelInfo.summarizesTextBetweenToolCalls`. Bedrock sets it for
the progress-update models, and the tool policy offers the tool only
when it is set, so other models' tool lists and prompts are
unchanged.
- When the tool is offered, the system prompt says that text outside
tool calls reaches the user only as a short summary, and that
verbatim content goes through send_user_message, attempt_completion
or ask_followup_question.
- Progress updates are now labelled "Zoo (progress update)" instead of
"Zoo said", shown in the muted description colour, with a tooltip
saying the provider sent the text as a progress update and that it
may be shorter than what the model wrote. The label names the
channel rather than calling the text a summary, because the
generic progress_update chunk could carry full text for other
providers. A new ClineMessage.progressUpdate flag carries this to
the webview.
Checked with a repro prompt (Opus 5.5 on Bedrock, raw API dump on,
2026-10-17) that asks for 4 Markdown link lists in chat text, each
written before a tool call in the same turn, and asks not to repeat
them in attempt_completion. Before this change, all 4 lists came back
as one-sentence progress-update summaries, and 0 of the 16 file links
reached the client, in each of 2 runs.
With this change, all 4 lists went through send_user_message and all
16 links reached the client verbatim; the two lists written after the
sizes were known had all 8 exact byte sizes each. No progress-update
block appeared at all. The model broke the prompt's "one tool call per
turn" to do this, and said why in a plain text block, which does
reach the user verbatim:
I'll send the list with `send_user_message`, because plain chat
text only reaches you as a summary. That puts two tool calls in
this turn.
Only Zoo's Bedrock backend sets the flag so far; the Anthropic and
Vertex providers don't request progress updates for these models yet.
- https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/prompting-claude-opus-5-5#user-facing-progress-updates
- https://platform.claude.com/docs/en/build-with-claude/thinking#progress-updates
See also Zoo-Code-Org#1820.
Assisted-by: Claude Opus 5.5 with Zoo Code1 parent 2f185d2 commit 0843a07
39 files changed
Lines changed: 424 additions & 21 deletions
File tree
- packages/types/src
- src
- api/providers
- __tests__
- core
- assistant-message
- __tests__
- prompts
- __tests__
- sections
- tools
- __tests__
- native-tools
- task
- __tests__
- tools
- __tests__
- webview-ui/src
- components/chat
- __tests__
- i18n/locales
- ca
- de
- en
- es
- fr
- hi
- id
- it
- ja
- ko
- nl
- pl
- pt-BR
- ru
- tr
- vi
- zh-CN
- zh-TW
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
271 | 271 | | |
272 | 272 | | |
273 | 273 | | |
| 274 | + | |
| 275 | + | |
274 | 276 | | |
275 | 277 | | |
276 | 278 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
164 | 164 | | |
165 | 165 | | |
166 | 166 | | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
167 | 173 | | |
168 | 174 | | |
169 | 175 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
45 | 46 | | |
46 | 47 | | |
47 | 48 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
181 | 181 | | |
182 | 182 | | |
183 | 183 | | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
184 | 199 | | |
185 | 200 | | |
186 | 201 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1573 | 1573 | | |
1574 | 1574 | | |
1575 | 1575 | | |
| 1576 | + | |
| 1577 | + | |
| 1578 | + | |
| 1579 | + | |
| 1580 | + | |
1576 | 1581 | | |
1577 | 1582 | | |
1578 | 1583 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
586 | 586 | | |
587 | 587 | | |
588 | 588 | | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
589 | 597 | | |
590 | 598 | | |
591 | 599 | | |
| |||
937 | 945 | | |
938 | 946 | | |
939 | 947 | | |
| 948 | + | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
940 | 956 | | |
941 | 957 | | |
942 | 958 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
339 | 339 | | |
340 | 340 | | |
341 | 341 | | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
342 | 356 | | |
343 | 357 | | |
344 | 358 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
| |||
452 | 453 | | |
453 | 454 | | |
454 | 455 | | |
455 | | - | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
456 | 463 | | |
457 | 464 | | |
458 | 465 | | |
| |||
530 | 537 | | |
531 | 538 | | |
532 | 539 | | |
| 540 | + | |
| 541 | + | |
533 | 542 | | |
534 | 543 | | |
535 | 544 | | |
| |||
904 | 913 | | |
905 | 914 | | |
906 | 915 | | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
907 | 923 | | |
908 | 924 | | |
909 | 925 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
364 | 364 | | |
365 | 365 | | |
366 | 366 | | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
367 | 377 | | |
368 | 378 | | |
369 | 379 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
| 86 | + | |
86 | 87 | | |
87 | 88 | | |
88 | 89 | | |
| |||
133 | 134 | | |
134 | 135 | | |
135 | 136 | | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
136 | 143 | | |
137 | 144 | | |
138 | 145 | | |
| |||
0 commit comments