fix(tools): let a row be a bare label when its arguments are all payload - #21
Merged
Conversation
`⏺ Exit Plan Mode(# Close the tool-result gaps - read cards - search
cards)` — the row squeezed the whole plan into 64 columns of parens, and
the review box directly below it then rendered the same plan in full,
properly formatted. The plan is payload, exactly like a write's content or
a delegation's brief, so it joins the bulk set.
That exposed a rule that was wrong for the same reason. When every
argument turned out to be bulk, the preview fell back to projecting them
all anyway, on the theory that a row should say something. It should not:
`formatToolCall` already renders a preview-less call as a bare label, and
a bare label is what the original shows for the tools whose real content
draws BELOW the row — `⏺ TodoWrite` over its checklist, `⏺ TaskCreate`,
`⏺ ExitPlanMode` over the plan under review. Dropping the fallback makes
those read right and takes a rule out.
⏺ Exit Plan Mode
⎿ Running…
╭──────────────────────────────────────────╮
│ Ready to code? │
│ Here is Claude's plan: │
…
Also teaches the probe LLM to emit several calls in one assistant message
(` ;; ` between them), because the collapsed brief only reads right across
a RUN of calls. The five-call run it produces renders
Searched for 1 pattern, read 2 files, listed 1 directory, ran 1 shell command
which is byte-identical to what Claude Code 2.1.235 renders for the same
five calls.
Co-Authored-By: Claude Opus 5 <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.
What
The row squeezed the whole plan into 64 columns of parens — and the review box directly below it then rendered the same plan in full, properly formatted:
A plan is payload, exactly like a write's content or a delegation's brief, so it joins the bulk set.
The rule that was wrong for the same reason
When every argument turned out to be bulk, the preview fell back to projecting them all anyway — on the theory that a row should say something. It should not:
formatToolCallalready renders a preview-less call as a bare label, and a bare label is what the original shows for the tools whose real content draws below the row —⏺ TodoWriteover its checklist,⏺ TaskCreate,⏺ ExitPlanModeover the plan under review. Dropping the fallback makes those read right and removes a rule.Brief parity, checked end to end
The probe LLM can now emit several calls in one assistant message (
;;between them), because the collapsed brief only reads right across a run of calls. Read, Read, Glob, Bash, Bash in one message:Byte-identical.
Test
npm run typecheck,npm test— 150 files / 1939 passingnode scripts/verify-boundary.mjstoolArgs.test.ts: a plan renders nothing; the all-bulk case now asserts the bare labelscripts/tool-gallery.py exit_plan_mode --live 8andmixed_run🤖 Generated with Claude Code