claude: project tool calls as work and pre-tool narration as commentary - #499
Merged
Merged
Conversation
A Claude turn reached the Editor as pure thinking: the adapter dropped every tool_use/tool_result, and all text stayed `unspecified`. The Editor therefore narrated the turn as Thinking with the newest thinking stretch as a changing header chip, promoted interim narration to answer paragraphs, and suppressed the shimmering live line whenever that narration streamed. Tool calls now project like Codex's: Bash as terminal activity (command, bounded output, failure) and every other tool as a step under the canonical kind the Editor groups (read, edit, grep, web_search, ...). The first tool-use block of a message re-phases that message's text as commentary, so the turn reads "Working for …" with narration and work rows inside it and the live summary line shimmering beneath. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Claude turns rendered unlike Codex turns: the header was the latest thinking stretch ("I should wrap up here · 35s") and kept changing, interim narration appeared as answer paragraphs, and there was no shimmering live line. The Claude adapter emitted no tool rows and tagged all text
unspecified, so the Editor saw a thought-only turn.What
claude/tools.rs:tool_use(buffered assistant frame) starts a step, the rootuserframe'stool_resultsettles it. Bash → terminal activity; Read/Write/Edit/Grep/Glob/WebSearch/WebFetch/Task/mcp → canonical tool kinds with their target as detail.claude/text.rs+ adapter: the firsttool_useblock of a message re-phases that message's text tocommentaryvia a snapshot; later text of the message streams as commentary.Verification
cargo test -p artisan-backend --lib engine_owner::engine_owner_claude: 64 pass.🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Summary by cubic
Claude turns now render like Codex turns instead of thought-only rows: tool calls project as work, and narration before a tool call is tagged as commentary.
Bashtool calls project as terminal activity with command, bounded output, and failure state; all other tools (read, write, edit, grep, glob, web search, web fetch, task, mcp) project as tool steps with canonical kind and target detail.commentary, so interim narration no longer appears as answer paragraphs.userframe settle the matching started tool; unknown or duplicate tool IDs emit nothing.Migration
No migration or rollout action needed; projection is gated by tests that fail when disabled.
Written for commit 8750ea5. Summary will update on new commits.