You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Other Local CLI agents are launch/runtime choices, but DevLog does not currently parse a durable local cost/usage history source for them. Adding fake scanners would broaden scope without data.
Summary
add explicit Cost Report provider and Local CLI agent coverage metadata
mark Claude and Codex as supported with their historical source path and cache strategy
mark the remaining Local CLI agents as intentionally unsupported for Cost Report until a durable usage source is implemented
add guardrail tests so future agents/providers cannot be added without updating cost coverage
[should-fix] cost-tracker.test.ts:98-102 — .filter((coverage) => coverage.supported) has no type predicate, so TypeScript does not narrow the union before .map((coverage) => coverage.provider). property only exists on the supported: true branch; accessing it on the bare union type is a type error. Fix: .filter((coverage): coverage is Extract<CostReportAgentCoverage, { supported: true }> => coverage.supported). If this compiles today it is likely because __tests__ files are excluded from tsconfig.json — but the latent unsoundness is worth closing.
[nit] cost-tracker.ts:26-71 — The key type of COST_REPORT_AGENT_COVERAGE is inferred as string. Typing it as Record<(typeof LOCAL_CLI_AGENT_DEFINITIONS)[number]['id'], CostReportAgentCoverage> would give compile-time enforcement (not just test-time) that every agent ID is covered. The test guardrail already handles this at runtime, so not a blocker.
[nit] cost-tracker.ts:31,37 — The cacheStrategy strings are long prose. They document intent well, but there is no machine-readable enum distinguishing "mtime cache", "incremental", etc. If the strings are ever queried programmatically (e.g., for a UI badge), a structured field would be better. No action needed now.
Verdict: APPROVE
The overall design is sound: deriving CostProvider from the as const array, using a discriminated union for coverage, and the three guardrail tests together enforce that the coverage map stays in sync with LOCAL_CLI_AGENT_DEFINITIONS and that COST_REPORT_PROVIDERS matches what is actually supported. The only issue worth addressing before merge is the missing type predicate in the third test.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Audit conclusion
~/.claude/projectsand Codex via~/.codex/sessions/ archived sessions.(path, mtimeMs, size)discovery cache; Codex now usesscanCodexSessionCached()from perf: cache Codex cost session scans #56.Summary
Verification