Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): only Claude progress updates before a tool call show as text #18923

Mergedmaria-rcksmerged 4 commits intomain fromrefs/pull/18923/headmerged by maria-rcks View on GitHub

Showing 2 changed files with 83 additions and 21 deletions.

x
0 of 2 viewed, 2 left
35 additions and 19 deletionsapps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.test.tsModified
View file
@@ -2809,10 +2809,29 @@
- // Summarized thinking can't tell a progress update from reasoning, so both stay Thoughts.
- it.effect.each(["claude-opus-5-5", "claude-fable-5-1", "claude-opus-5", "claude-sonnet-4-6"])(
- "keeps %s thinking right before a tool call as reasoning",
- (model) =>
+ // Summarized display can't mark a progress update, so only the second of two
+ // thinking blocks before a tool call becomes text; a lone block is reasoning.
+ const plan = "Planning the check";
+ const update = "Found it: the memory file is the cause.";
+ it.effect.each([
+ {
+ model: "claude-opus-5-5",
+ texts: [plan, update],
+ expected: ["reasoning", "assistant_message"],
+ },
+ {
+ model: "claude-fable-5-1",
+ texts: [plan, update],
+ expected: ["reasoning", "assistant_message"],
+ },
+ { model: "claude-opus-5", texts: [plan, update], expected: ["reasoning", "reasoning"] },
+ { model: "claude-sonnet-4-6", texts: [plan, update], expected: ["reasoning", "reasoning"] },
+ { model: "claude-opus-5-5", texts: [plan], expected: ["reasoning"] },
+ { model: "claude-opus-5-5", texts: [plan, " \n "], expected: ["reasoning", "reasoning"] },
+ { model: "claude-opus-5-5", texts: [" \n ", update], expected: ["reasoning", "reasoning"] },
+ ] as const)(
+ "shows $model thinking $texts before a tool call as $expected",