Include Claude Desktop local-agent usage#1922
Conversation
|
Codex review: needs maintainer review before merge. Reviewed July 5, 2026, 5:22 PM ET / 21:22 UTC. Summary Reproducibility: yes. Source inspection shows current main scans only the existing Claude roots, so a Desktop local-agent-only project store under Application Support/Claude is not included; the PR tests model that missing path. Review metrics: 1 noteworthy metric.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land the focused locator/scanner/source-detection update after normal maintainer checks, keeping discovery bounded to known Claude Desktop stores and preserving the existing CLAUDE_CONFIG_DIR override. Do we have a high-confidence way to reproduce the issue? Yes. Source inspection shows current main scans only the existing Claude roots, so a Desktop local-agent-only project store under Application Support/Claude is not included; the PR tests model that missing path. Is this the best way to solve the issue? Yes. A shared bounded locator is the narrowest maintainable path because it keeps scanner and source-detection behavior aligned, preserves existing overrides, and avoids arbitrary workspace recursion. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 8cbe84873c52. Label changesLabel changes:
Label justifications:
Evidence reviewedWhat I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
Review history (1 earlier review cycle)
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fedc7f2d12
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Summary
.claude/projectsroots under both Claude Desktop session stores.~/.claude/projectsCLI logs..git,node_modules,build,DerivedData,target, andoutputs.Why
Claude Desktop local-agent mode can write usage logs outside the usual Claude CLI paths (
~/.config/claude/projectsand~/.claude/projects). When that happens, CodexBar can miss real Claude usage from today and show no local usage even though Claude was used.This change teaches CodexBar to also look in the Desktop local-agent session stores, while avoiding recursive scans through user project workspaces. Metadata-only
claude-code-sessionsdirectories do not enable cost history by themselves.Validation
swift test --filter 'CostUsageScannerClaudeDesktopTests|SettingsStoreCoverageTests'make checkmake test(all 48 shards)cliSessionIdmatched its shared~/.claude/projectsJSONL, and the branch CLI returned a nonzero refreshed local cost report.Screenshot
before

after
