[Bug] `/team-onboarding` excludes subagent tool calls from MCP usage analytics
Bug Description
/team-onboarding misses subagent tool calls — produces inverted picture for orchestrated workflows
Summary
The MCP and tool-usage counts surfaced by /team-onboarding only reflect calls made from the parent session. Calls made by spawned subagents (Agent tool descendants) are invisible to the collector. For users whose work runs through a subagent pipeline, this inverts the picture of what tools the team actually relies on.
Evidence from my data
| MCP server | Reported calls | Reality |
|---|---|---|
| codebase-memory-mcp | 3 | Hundreds. It's wired into lead-engineer, junior-engineer, qa-engineer, and product-owner agents — the team's primary code-search tool. The parent session almost never calls it directly because the subagents own that work. |
| atlassian | 1003 | Accurate, because I call it from the parent session for sprint orchestration. |
The 3-vs-1003 gap isn't proportional to actual usage — it's proportional to who calls the tool. Any MCP an agent owns is effectively erased from the guide.
Why this matters for /team-onboarding
The skill's purpose is to show a new teammate how the team uses Claude Code. For mature workflows built on subagents, the output recommends the wrong tools — surfacing what the orchestrator touches directly and hiding what the actual workers use. A teammate reading my guide would conclude codebase-memory-mcp is barely used, when it's central.
Secondary issues
These compound the problem but aren't the headline:
windowDaysis asserted, not measured. Header claims 30 days; earliest session in my data is 9 days ago. Should be derived from actual session timestamps.- Auto-spawned agent sessions count as user sessions. ~35 of 60 session descriptors are
runtime-auditorinvocations the sprint loop fires automatically ("Audit this agent run in quiet mode..."). They dominate the work-type breakdown without representing user-initiated work.
Suggested fix
Roll up subagent tool calls into the parent session's tally, or surface them in a separate "via subagents" column. Without this, /team-onboarding is misleading for exactly the users most likely to run it — those with mature pipelines worth onboarding others to.
Environment Info
- Platform: darwin
- Terminal: pycharm
- Version: 2.1.146
- Feedback ID: 24dcb0e4-502f-4411-9c8d-efba53feaade
Errors
[]This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗