Claude Code Now Breaks Down Usage Cost per Skill, Agent, and MCP Server in VSCode — What Enterprise Operators Need to Know

The June 12 Claude Code release adds per-skill, per-agent, and per-MCP-server cost attribution to the VSCode /usage dialog, fixes a Bedrock GovCloud bug, and closes a background-session credential leak.

TheRouter Newsroomvia Anthropic (Claude Code Releases)
Editorial diagram showing Claude Code usage attribution streams branching into per-skill, per-agent, and per-MCP cost dimensions through a routing layer

The June 12 Claude Code release shipped three changes that, taken together, close a significant gap in how enterprise teams understand and govern agentic coding spend. The headline is the new VSCode /usage dialog, which now decomposes token cost by cache misses, long-context invocations, subagent dispatches, and — critically — per-skill, per-agent, per-plugin, and per-MCP-server attribution over 24-hour and 7-day windows.

If you are running Claude Code across a team and have been relying on aggregate token counters to manage cost, this release changes what you can measure. Two other fixes in the same release address operational risks that affect compliance-critical and multi-tenant deployments.

What happened

The June 12 Claude Code release introduced:

  • VSCode /usage cost attribution dialog. The Account & usage view (/usage) in the VSCode extension now displays a detailed breakdown of usage over the last 24 hours or 7 days. The breakdown includes cache misses, long-context sessions, subagent token consumption, and — for the first time — per-skill, per-agent, per-plugin, and per-MCP-server attribution. Teams can now see which component consumed what fraction of their token budget without building a custom telemetry pipeline.

  • Bedrock GovCloud inference-profile prefix fix. AWS GovCloud regions (us-gov-*) were deriving the wrong inference profile prefix — global instead of us-gov — which caused 400 errors when Claude Code attempted to resolve derived model IDs. The fix ensures GovCloud sessions use the correct us-gov prefix, restoring model access for teams operating under FedRAMP High and DoD IL4/5 compliance requirements.

  • Background session credential isolation. Background sessions were inheriting ANTHROPIC_* environment variables — gateway URL, custom headers, /model aliases — from the shell that started the background daemon. This meant a background agent dispatched onto a pre-warmed worker could route through an API gateway or use credentials that belonged to a different team or session. The fix isolates each background session's provider environment.

Additional fixes include a 1–2 second pause on exit after shell command interruption, git commit co-author attribution corrections, /advisor dialog pre-selecting blocked models, skill hot-reload now re-announcing only changed skills, and Workflow tool subagent attribution headers.

Why it matters for AI engineering teams

Per-component cost attribution changes how you audit agent spend

Before this release, the best way to attribute Claude Code cost to specific components was to build an OpenTelemetry pipeline and manually label sessions — as described in the June 2 OTEL metrics release. The OTEL path remains the right choice for teams that need gateway-side verification and long-term storage. But for the common case — "which skill is burning through our monthly budget?" — the /usage dialog now answers that question without any infrastructure.

This matters because Claude Code's skill and MCP ecosystem is expanding. Teams are running custom skills for code review, documentation generation, deployment validation, and database migrations — each with different token profiles. A code-review skill that triggers a subagent per pull request can accumulate significant cost without surfacing it in any single session's context. The new /usage dialog makes that cost visible at the IDE level, before it hits your billing dashboard.

GovCloud fix restores compliance-critical routing

Teams running Claude Code on AWS GovCloud under FedRAMP High or DoD IL4/5 compliance frameworks were blocked from model access by a prefix derivation bug. The inference profile system maps region prefixes to model availability — us-gov regions have a different model catalog than global regions. When Claude Code derived global instead of us-gov, model resolution failed with 400 errors.

This fix is narrow in scope but high in impact. GovCloud teams are typically regulated enterprises with strict routing requirements: they cannot fall back to commercial AWS regions. A broken inference profile prefix does not degrade gracefully — it fails hard. If you paused a GovCloud Claude Code rollout due to model access errors in recent weeks, this release is the re-enablement point.

Background session credential isolation closes a multi-tenant risk

The background session credential leak is the most security-sensitive fix in this release. Before the fix, a background agent could inherit ANTHROPIC_BASE_URL, ANTHROPIC_API_KEY, or custom headers from the shell that spawned the daemon. In a shared development environment — where multiple developers start background daemons from different terminal sessions — this creates a cross-contamination risk.

The practical scenario: Developer A starts the Claude Code daemon from a shell configured to route through a shared team API gateway. Developer B starts a background session from the same machine. Developer B's session would inherit Developer A's gateway configuration, routing requests through A's credentials. The fix ensures each background session resolves its provider environment independently.

The router/operator angle

The three changes in this release converge on a single operational theme: component-level visibility and isolation in agentic coding workflows.

For teams running Claude Code through a routing layer — whether a shared API gateway, TheRouter, or a custom proxy — the /usage dialog changes the attribution model. Previously, the gateway saw a single upstream and had to infer cost attribution from session metadata or custom headers. Now, the client-side attribution is detailed enough to build a per-component cost model without any gateway-side instrumentation.

This creates a useful validation pattern: pair the client-side /usage breakdown with gateway-level request ledgers to cross-reference. If the client says the code-review skill consumed 40,000 tokens but the gateway logged 60,000 tokens from that team's sessions, you have a gap to investigate — either a skill that's generating hidden subagent traffic or a configuration issue.

The GovCloud fix reinforces a pattern that compliance-oriented teams should internalize: provider region routing in Claude Code is model-aware. The inference profile system does not just select a model — it maps region to model catalog. Teams with strict regional requirements should validate that their Claude Code configuration derives the correct prefix after updating.

The background credential isolation fix has implications for teams running shared CI/CD infrastructure. If your CI pipeline starts Claude Code background agents on shared runners, each job's provider environment is now properly isolated. This eliminates a class of cross-job credential leakage that was difficult to detect because the agents appeared to function normally — they were just routing through the wrong credentials.

What to watch

  • Audit your /usage breakdown. After updating to the June 12 release, check the 7-day window. If any single skill, plugin, or MCP server accounts for more than 30% of your team's token spend, that is a candidate for model-tier optimization — route it to a cheaper model for leaf tasks while reserving the strongest model for planning.
  • GovCloud teams: verify your inference profile. Run /status after updating to confirm the region prefix reads us-gov and not global. If you see global, your configuration may still be pinning the wrong region.
  • Background daemon hygiene. The credential isolation fix means background sessions no longer inherit your shell's environment. If you relied on that implicit inheritance — for example, setting ANTHROPIC_BASE_URL in your .bashrc and expecting background agents to pick it up — you now need to configure provider routing at the session level or via managed settings.
  • Cross-reference client vs gateway attribution. The /usage dialog gives you client-side visibility; a gateway-level request ledger gives you provider-side verification. Pair them to detect drift — especially for MCP servers that make secondary API calls that the client attributes as "MCP server" but the gateway sees as distinct requests.
  • Skill hot-reload now only re-announces changed skills. This is a performance fix, but it also means your observability pipeline needs to handle partial skill-list updates rather than full re-announcements. If your cost attribution relies on skill-list events, verify your collector handles incremental updates.
Help & contact