Repository navigation
Description
Summary
A single physical working directory shows up as multiple separate "projects" in CodeBurn's sessions/models --by-task output when different providers/tools are used against it, because each provider's own path-sanitization convention produces a different project key for the same directory. This splits cost, call count, and session count across what should be one bucket in By Project views.
This is a different root cause than #217 (which was a single-provider, Windows-only case+slash variant issue and is closed). Here the paths are already consistent per-provider — the split happens across providers on the same Linux host, because each provider's own discovery code sanitizes cwd differently.
Environment
- Platform: Ubuntu 24.04, Node 24.20.0
- CodeBurn: 0.9.24
- Providers involved:
claude,codex,hermes,kimicode,pi— all pointed at the same physical directory/root/vault
Repro
Run multiple different AI coding tools (Claude Code, Codex CLI, Hermes agent, Kimi Code CLI, Pi coding agent) against the same working directory, then:
codeburn sessions -p 30days --format jsonActual output
The single directory /root/vault surfaces under three distinct project keys, one per sanitization convention:
-root-vault -> provider: claude (Claude Code's own ~/.claude/projects/-root-vault/ naming, leading dash)
root-vault -> providers: codex, hermes (no leading dash)
vault -> providers: kimicode, pi (basename only)
Each of these accumulates its own separate cost/call/session totals in By Project views (codeburn TUI, codeburn sessions, codeburn models --by-task, etc.), even though they all refer to the exact same repo/directory. A user comparing "which project costs the most" gets a misleading answer — the true per-project total is silently split 3 ways.
This isn't specific to /root/vault — the same pattern reproduces for every directory used across more than one of these providers, since it's driven by each provider's own path-to-project-key logic, not by anything project-specific.
Expected
Project keys derived from the same underlying absolute directory path should normalize to one canonical project across providers — e.g. resolve each provider's sanitized key back to a real filesystem path where possible (most providers already store or can derive the real cwd), then group by that resolved path rather than by the provider-specific sanitized string.
Suggested fix
- Where a provider's session data includes (or can derive) the real absolute
cwd, use that as the grouping key instead of (or in addition to) the provider's own sanitized folder-name convention. - Where only the sanitized key is available, normalize known conventions before grouping (strip a single leading
-, compare basenames as a fallback bucket) — similar in spirit to the Windows: same project shown under 3+ paths (case + slash variants), splitting cost/session counts #217 fix, but applied across providers rather than within one provider's own path variants. - A
codeburn project-aliascommand (mirroring the existingmodel-alias/model-flat-ratedesign) would also let users manually merge project keys they know refer to the same directory, without waiting on automatic detection for every provider's sanitization scheme.
Notes
Found while auditing 30-day usage across 8 concurrently-used agents/tools on the same host — happy to share the raw (anonymized) codeburn sessions --format json project-key list if useful for reproducing the grouping logic.
Activity
iamtoruk commentedon Sep 10, 2026
Fixed on main by #1271: projects are keyed by the resolved absolute directory now, so -root-vault, root-vault and vault fold into one row when the abs path aligns (pinned in tests/cross-provider-project-merge.test.ts). Pi now records its cwd; Kimi, Codex, Hermes and Claude already did. Not in 0.9.24; it ships with the next release. If you still see a split after upgrading, the anonymized key list would help. Holding off on a project-alias command until a case turns up that automatic resolution cannot see.