Problem to solve
When the agent invokes the bash tool in batch mode (commands: [...], mode: "parallel"|"sequential"), the TUI verbose tool_call line renders as just $ with an empty command. The reader can't see what's about to run; the tool_response panel shows the per-command outputs ([1/5] $ sleep 5, …), so the information leaks back later — but the call line itself is uninformative.
Solution
Update ToolCallDecorator#format_input to handle the batch-mode shape — render either each command on its own line prefixed with $ (preserving the per-line look that matches the response panel), or a single $ commands × N (mode: parallel) summary, depending on view density. The single-command branch stays unchanged.
Where
app/decorators/tool_call_decorator.rb:132-144 — format_input, when "bash" branch only handles input&.dig("command"). Add a branch for input["commands"].is_a?(Array).
lib/tools/bash.rb:23-37 — schema reference: tool accepts command (string) OR commands (array) + mode ("sequential"|"parallel").
Reproduce
- Ask Ani: "sleep 5 times in parallel with different durations".
- Ani picks Bash batch mode (
mode: "parallel", commands: ["sleep 5", "sleep 10", …]) — one tool_use, one tool_response.
- TUI verbose tool_call line shows:
Suggested rendering
Compact batch summary:
💻 bash (parallel × 5)
$ sleep 5
$ sleep 10
$ sleep 15
$ sleep 20
$ sleep 25
Or, for very wide batches, truncate with the existing truncate_lines helper (used by the generic fallback at line 142).
Why this stays in the decorator
The TUI is purely a rendering surface. Bash batch shape is already a stable part of the tool API (per lib/tools/bash.rb); only the rendering needs to keep up. No model or pipeline changes required.
Acceptance
Problem to solve
When the agent invokes the
bashtool in batch mode (commands: [...],mode: "parallel"|"sequential"), the TUI verbose tool_call line renders as just$with an empty command. The reader can't see what's about to run; thetool_responsepanel shows the per-command outputs ([1/5] $ sleep 5, …), so the information leaks back later — but the call line itself is uninformative.Solution
Update
ToolCallDecorator#format_inputto handle the batch-mode shape — render either each command on its own line prefixed with$(preserving the per-line look that matches the response panel), or a single$ commands × N (mode: parallel)summary, depending on view density. The single-commandbranch stays unchanged.Where
app/decorators/tool_call_decorator.rb:132-144—format_input,when "bash"branch only handlesinput&.dig("command"). Add a branch forinput["commands"].is_a?(Array).lib/tools/bash.rb:23-37— schema reference: tool acceptscommand(string) ORcommands(array) +mode("sequential"|"parallel").Reproduce
mode: "parallel", commands: ["sleep 5", "sleep 10", …]) — one tool_use, one tool_response.Suggested rendering
Compact batch summary:
Or, for very wide batches, truncate with the existing
truncate_lineshelper (used by the generic fallback at line 142).Why this stays in the decorator
The TUI is purely a rendering surface. Bash batch shape is already a stable part of the tool API (per
lib/tools/bash.rb); only the rendering needs to keep up. No model or pipeline changes required.Acceptance
$ <command>exactly as todayspec/decorators/tool_call_decorator_spec.rbfor both shapes