-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
Describe the feature or problem you'd like to solve
During a session the agent invokes a wide variety of tools — MCP server tools, built-in tools (shell, file read/write, grep, glob), sub-agent launchers, and native functions — but there is no consolidated view of which tools have been called, how often, whether any failed, or how long they took. This information is buried in the scrollback or log files. For users debugging agent behaviour, optimising tool usage, or monitoring costs, a live at-a-glance tool usage panel would be invaluable.
Proposed solution
Add an optional Tool Usage panel — collapsible/expandable, opt-in via config — that shows a live, categorised summary of all tool invocations for the current session.
Folded (compact):
🔧 Tools [24 calls · 1 error · 3 MCP · 8 built-in · 2 native]
Unfolded (expanded, grouped by category):
🔧 Tool Usage
MCP Servers
playwright 4 calls ✔ 4 ✖ 0 avg 1.2s
memory 2 calls ✔ 2 ✖ 0 avg 0.1s
git 3 calls ✔ 2 ✖ 1 avg 0.8s ⚠ 1 error
Built-in Tools
powershell 6 calls ✔ 6 ✖ 0 avg 3.4s
grep 4 calls ✔ 4 ✖ 0 avg 0.2s
glob 2 calls ✔ 2 ✖ 0 avg 0.1s
view 3 calls ✔ 3 ✖ 0 avg 0.1s
Sub-agents
explore 2 calls ✔ 2 ✖ 0 avg 8.1s
task 1 call ✔ 1 ✖ 0 avg 22.3s
Native / Functions
lsp 2 calls ✔ 2 ✖ 0 avg 0.4s
Each row shows: call count, success/failure counts, and average duration. Rows with errors are highlighted. The panel updates live as tools are invoked.
Controls:
- Toggle fold/unfold: dedicated key (e.g.
Ctrl+T) or clickable header - Opt-in via
config.json:{ "toolPanel": true } - Disabled by default — clean UI for new users, visible for power users who enable it.
- Companion to the Session Stats panel (Collapsible real-time session stats panel (tokens, context, API calls, premium requests, cache, duration) #1784) — together they give a full resource and activity picture.
Example prompts or workflows
- Agent repeatedly fails on a
gitMCP tool — user spots⚠ 1 errorin the folded line without waiting for the agent to surface it. - User notices
powershellhas been called 18 times in one turn — a signal the agent may be in a loop, prompting early intervention. - Developer building a custom MCP server verifies their tool is being invoked the expected number of times and with the expected latency.
- User monitoring plan usage sees that
exploresub-agents have been launched 6 times and adjusts their prompt strategy to consolidate searches. - User keeps the panel folded — the one-line badge gives just enough signal (
24 calls · 1 error) to catch problems without cluttering the screen.
Additional context
- OS: Windows 11 Pro (Build 26200 / 24H2)
- Shell: PowerShell 7.5.4
- Copilot CLI: 0.0.420 (win32-x64)
- Closely related to the Session Stats panel (Collapsible real-time session stats panel (tokens, context, API calls, premium requests, cache, duration) #1784) and Worker Agents panel (Collapsible worker/background agent panel showing active sub-agents, model, reasoning level, and task description #1783) — all three form a coherent optional monitoring layer for power users.
- Tool invocation data is already present in session logs (
--log-level) — this panel surfaces it live in the TUI without requiring log parsing. - Error highlighting should use the same colour conventions as the rest of the TUI (red for failures, yellow for warnings).