Skip to content

fix(tools): let a row be a bare label when its arguments are all payload - #21

Merged
ericleepi314 merged 1 commit into
mainfrom
bare-label-rows
Aug 19, 2026
Merged

fix(tools): let a row be a bare label when its arguments are all payload#21
ericleepi314 merged 1 commit into
mainfrom
bare-label-rows

Conversation

@ericleepi314

Copy link
Copy Markdown
Collaborator

What

before   ⏺ Exit Plan Mode(# Close the tool-result gaps - read cards - search cards)
after    ⏺ Exit Plan Mode

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:

⏺ Exit Plan Mode
  ⎿  Running…
╭────────────────────────────────────────────╮
│ Ready to code?                             │
│ Here is Claude's plan:                     │
│ ┌────────────────────────────────────────┐ │
│ │ Close the tool-result gaps             │ │
│ │ • read cards                           │ │
│ │ • search cards                         │ │
│ └────────────────────────────────────────┘ │
│ Would you like to proceed?                 │
│ ❯ 1. Yes, and bypass permissions           │
…

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: 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 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:

dsh-ccTUI     Searched for 1 pattern, read 2 files, listed 1 directory, ran 1 shell command
Claude Code   Searched for 1 pattern, read 2 files, listed 1 directory, ran 1 shell command

Byte-identical.

Test

  • npm run typecheck, npm test — 150 files / 1939 passing
  • node scripts/verify-boundary.mjs
  • toolArgs.test.ts: a plan renders nothing; the all-bulk case now asserts the bare label
  • live captures via scripts/tool-gallery.py exit_plan_mode --live 8 and mixed_run

🤖 Generated with Claude Code

`⏺ 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>
@ericleepi314
ericleepi314 merged commit 8b0efde into main Aug 19, 2026
1 check passed
@ericleepi314
ericleepi314 deleted the bare-label-rows branch August 19, 2026 09:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant