fix(tui): avoid double-formatting friendly tool labels - #62809
Open
CNSeniorious000 wants to merge 2 commits into
Open
fix(tui): avoid double-formatting friendly tool labels#62809CNSeniorious000 wants to merge 2 commits into
CNSeniorious000 wants to merge 2 commits into
Conversation
13 tasks
teknium1
reviewed
Jul 11, 2026
teknium1
left a comment
Contributor
There was a problem hiding this comment.
Thanks for tracing the producer/consumer contract across live events and resumed history. The core fix is needed: current main passes build_tool_label() through context (tui_gateway/server.py:3441-3445, :3595-3607), and Ink wraps that context (ui-tui/src/components/thinking.tsx:840; ui-tui/src/lib/text.ts:198-203).
Problems
delegate_tasknow renders asDelegating …(agent/display.py:582), butToolTrailonly detectsDelegate Taskatui-tui/src/components/thinking.tsx:889and:1066. After this PR's label pass-through at:840, delegated subagents no longer attach inline to their tool group and the/agentshint is omitted.
Suggested changes
- Match both
Delegate TaskandDelegatingthrough one predicate at both call sites, with a focused delegate-label/subagent rendering test.
Automated hermes-sweeper review.
1 task
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.
Summary
The TUI treated backend-formatted friendly tool labels as raw context and passed them through
formatToolCall(...)again, duplicating the displayed action.Changes
Validation
tests/test_tui_gateway_server.py(3 passed)bunx vitest run src/__tests__/text.test.ts src/__tests__/createGatewayEventHandler.test.ts src/__tests__/messages.test.ts(114 passed)bun run typecheckgit diff --checkFixes #62796