fix: show correct tool count in TUI when running in --remote mode#1648
Merged
dgageot merged 1 commit intodocker:mainfrom Feb 11, 2026
Merged
fix: show correct tool count in TUI when running in --remote mode#1648dgageot merged 1 commit intodocker:mainfrom
dgageot merged 1 commit intodocker:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Review Summary
Found 2 issues in the changed code that should be addressed:
- Error handling in GetAgentToolCount: When the tool count fetch fails, the code emits a misleading zero-count response
- URL path construction: The GetAgentToolCount function doesn't properly handle special characters in path parameters
Both issues are in newly added code and could cause unexpected behavior in production.
The remote TUI sidebar displayed an incorrect tool count because of two issues: 1. The HTTP SSE client was missing event type registrations for toolset_info, agent_info, team_info, agent_switching, and several other event types added after the initial implementation. These events were silently dropped, so the TUI never received the real tool count streamed by the server during RunStream. 2. RemoteRuntime.EmitStartupInfo used len(cfg.Toolsets) — the number of toolset configurations (e.g. mcp, shell, filesystem) — instead of the actual number of individual tools. There was no server-side API to query the real count at startup. This commit: - Adds missing event types to the HTTP SSE client registry - Adds a GetAgentToolCount RPC (proto + ConnectRPC + HTTP) that loads the agent's team and counts its tools server-side - Updates RemoteRuntime.EmitStartupInfo to call GetAgentToolCount, showing a loading indicator while the count is fetched - Fixes the sidebar to skip empty tool status lines Assisted-By: cagent
409f31e to
d3d2bbc
Compare
rumpl
approved these changes
Feb 11, 2026
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.
The remote TUI sidebar displayed an incorrect tool count because of two issues:
The HTTP SSE client was missing event type registrations for toolset_info, agent_info, team_info, agent_switching, and several other event types added after the initial implementation. These events were silently dropped, so the TUI never received the real tool count streamed by the server during RunStream.
RemoteRuntime.EmitStartupInfo used len(cfg.Toolsets) — the number of toolset configurations (e.g. mcp, shell, filesystem) — instead of the actual number of individual tools. There was no server-side API to query the real count at startup.
This commit:
Assisted-By: cagent