Repository navigation
Description
What happened
The Usage page only ever reflects the default Claude home and the default Codex home. With a second Claude-driver provider instance configured (providerInstances.kimi → driver claudeAgent, its own homePath/CLAUDE_CONFIG_DIR, Anthropic-compatible endpoint), threads run through that instance are invisible in Usage — no provider row, no model rows, nothing in the daily chart — even though its transcripts are written under its own <homePath>/projects exactly like the default instance's.
Diagnosis
UsageService.resolveTranscriptDirs (apps/server, //#region src/usage/UsageService.ts) reads only the legacy single-instance settings:
const claudeHome = yield* resolveClaudeHomePath(settings.providers.claudeAgent);
const claudeDir = yield* resolveClaudeTranscriptDir(claudeHome);
const codexLayout = yield* resolveCodexHomeLayout(settings.providers.codex);
return [{ provider: "claude", dir: claudeDir }, { provider: "codex", dir: path.join(codexLayout.sharedHomePath, "sessions") }];settings.providerInstances is never consulted, so any non-default instance (second Claude home, a Codex instance with a different homePath/shadowHomePath) is excluded from the scan. The rest of the pipeline (readFileRecords, dedupe, per-provider attribution) is keyed only by "claude" | "codex", so there is also no way to attribute usage to an instance even if its directory were added.
Suggested fix (small, contained): build the dir list from providerInstances — for every claudeAgent instance use resolveClaudeTranscriptDir(resolveClaudeHomePath(instance.config)), for every codex instance resolveCodexHomeLayout(instance.config).sharedHomePath + "/sessions" — dedupe by path, and tag records with instanceId so the UI can show an instance row (display name) instead of lumping everything under "Claude Code"/"Codex". Models the instance serves under non-Anthropic slugs (here k3-256k, k3[1m], kimi-for-coding) would then at least show token counts (they have no LiteLLM rate, so cost stays blank — same as gpt-5.3-codex-spark/codex-auto-review today).
Steps to reproduce
- Add a second Claude-driver instance in
settings.jsonwith a differentconfig.homePath(e.g.C:\Users\<user>\.claude-kimi) and run a thread on it. - Confirm a transcript appears under
<homePath>\projects\…\*.jsonl. - Open Usage: the instance and its models are absent;
UsageService.resolveTranscriptDirsspan shows only the two default dirs.
Version
0.0.34-nightly.20260819.1132 (commit 36f4314).
Environment
Windows 11 Pro 10.0.26100; providerInstances: claudeAgent (default), kimi (claudeAgent driver, homePath ~/.claude-kimi), codex, cursor, grok.
Evidence
# UsageService.resolveTranscriptDirs span: Success, 67 ms — returns exactly two entries (claude default projects dir, ~/.codex/sessions)
# Usage page (UI Automation dump): provider rows = "Codex", "Claude Code" only; model rows = gpt-5.6-sol, claude-opus-5, claude-fable-5, claude-opus-4-8, gpt-5.6-terra, claude-haiku-4-5-20251001, gpt-daybreak-blue-latest ($0.00 / 326M), gpt-5.3-codex-spark (no cost / 5.86M), codex-auto-review (no cost / 1.62M), <synthetic> (0)
# no k3-256k / k3[1m] rows although ~/.claude-kimi/projects contains today's transcriptsRelated issues
#7088 (usage scan performance) is about scan cost, not coverage; no existing issue covers provider instances in Usage.
Fix applied or workaround
None (no setting to add transcript dirs).
Filed by
Claude (Fable 5) via Claude Code on the reporter's machine, at the reporter's request.
Activity
t3-code-bot commentedon Aug 20, 2026
closing as a duplicate of #5805 so the issue stays tracked in one place.