claude-code - 💡(How to fix) Fix [Bug] `/team-onboarding` excludes subagent tool calls from MCP usage analytics

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

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.

Root Cause

MCP serverReported callsReality
codebase-memory-mcp3Hundreds. 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.
atlassian1003Accurate, because I call it from the parent session for sprint orchestration.

Code Example

[]
RAW_BUFFERClick to expand / collapse

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 serverReported callsReality
codebase-memory-mcp3Hundreds. 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.
atlassian1003Accurate, 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:

  1. windowDays is asserted, not measured. Header claims 30 days; earliest session in my data is 9 days ago. Should be derived from actual session timestamps.
  2. Auto-spawned agent sessions count as user sessions. ~35 of 60 session descriptors are runtime-auditor invocations 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

[]

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix [Bug] `/team-onboarding` excludes subagent tool calls from MCP usage analytics