Skip to content

Comments

fix: skip duplicate send_tool_output for shell-streamed tools#516

Merged
bug-ops merged 2 commits intomainfrom
fix/497/tui-diff-v2
Feb 18, 2026
Merged

fix: skip duplicate send_tool_output for shell-streamed tools#516
bug-ops merged 2 commits intomainfrom
fix/497/tui-diff-v2

Conversation

@bug-ops
Copy link
Owner

@bug-ops bug-ops commented Feb 18, 2026

Summary

  • Add ToolOutput.streamed flag to indicate tools that already sent output via ToolEvent channel (shell streaming path)
  • Skip send_tool_output in streaming.rs for streamed tools to prevent duplicate TUI messages
  • Shell executor sets streamed = true when tool_event_tx is available; all other executors default to false

Follows up on #508 which forwarded send_tool_output through enum dispatchers but inadvertently caused bash tool output to appear twice in TUI.

Test plan

  • Run TUI, trigger bash commands — verify single tool message per execution
  • Trigger edit/write tools — verify diff still renders correctly
  • cargo nextest run --workspace --lib --bins

Add ToolOutput.streamed flag to indicate tools that already sent their
output via ToolEvent channel (shell streaming path). In streaming.rs,
skip send_tool_output for these tools to prevent duplicate TUI messages.
@github-actions github-actions bot added rust core bug Something isn't working size/M labels Feb 18, 2026
Propagate the new ToolOutput.streamed field to all struct
initializations across test mocks and executor implementations
to fix compilation errors after the duplicate output prevention
change.
@github-actions github-actions bot added the tests label Feb 18, 2026
@bug-ops bug-ops enabled auto-merge (squash) February 18, 2026 01:50
@bug-ops bug-ops merged commit dab019f into main Feb 18, 2026
18 checks passed
@bug-ops bug-ops deleted the fix/497/tui-diff-v2 branch February 18, 2026 01:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant