Skip to content

Troubleshooting

Run a scoped check first:

Terminal window
llm-usage daily --source pi
llm-usage daily --source codex
llm-usage daily --source gemini
llm-usage daily --source droid
llm-usage daily --source opencode
llm-usage daily --source openclaw
llm-usage daily --source claude
llm-usage daily --source copilot
llm-usage daily --source goose
llm-usage daily --source amp
llm-usage daily --source qwen
llm-usage daily --source kimi
llm-usage daily --source cline
llm-usage daily --source roocode
llm-usage daily --source kilocode
llm-usage daily --source antigravity

If OpenCode or Goose is expected, provide an explicit DB path:

Terminal window
llm-usage daily --source opencode --opencode-db /path/to/opencode.db
llm-usage daily --source goose --goose-db /path/to/goose/sessions.db

SQLite-backed source parsing for OpenCode, Goose, and Antigravity requires Node.js 24+ runtime with built-in node:sqlite.

  • --source-dir supports only pi, codex, gemini, droid, openclaw, claude, copilot, amp, qwen, kimi, cline, roocode, kilocode, and antigravity.
  • --pi-dir, --codex-dir, --gemini-dir, --droid-dir, --claude-dir, --copilot-dir, --amp-dir, --qwen-dir, --kimi-dir, --cline-dir, --roocode-dir, --kilocode-dir, and --antigravity-dir must point to valid directories.
  • For OpenCode, use --opencode-db.
  • For Goose, use --goose-db.

Correct examples:

Terminal window
llm-usage daily --source-dir pi=/path/to/pi --source-dir codex=/path/to/codex --source-dir gemini=/path/to/.gemini --source-dir droid=/path/to/.factory/sessions --source-dir openclaw=/path/to/.openclaw/agents --source-dir claude=/path/to/.claude/projects --source-dir copilot=/path/to/.copilot/otel --source-dir amp=/path/to/amp/threads --source-dir qwen=/path/to/.qwen/projects --source-dir kimi=/path/to/kimi/sessions --source-dir cline=/path/to/cline/tasks --source-dir roocode=/path/to/roocode/tasks --source-dir kilocode=/path/to/kilocode/tasks --source-dir antigravity=/path/to/antigravity/conversations
llm-usage daily --pi-dir /path/to/pi --codex-dir /path/to/codex --gemini-dir /path/to/.gemini --droid-dir /path/to/.factory/sessions --claude-dir /path/to/.claude/projects --copilot-dir /path/to/.copilot/otel --amp-dir /path/to/amp/threads --qwen-dir /path/to/.qwen/projects --kimi-dir /path/to/kimi/sessions --cline-dir /path/to/cline/tasks --roocode-dir /path/to/roocode/tasks --kilocode-dir /path/to/kilocode/tasks --antigravity-dir /path/to/antigravity/conversations
llm-usage daily --opencode-db /path/to/opencode.db
llm-usage daily --goose-db /path/to/goose/sessions.db

Default LiteLLM pricing works without a warm cache because the CLI includes a bundled LiteLLM snapshot. If you see this warning, the run succeeded from that snapshot:

Pricing: using the bundled LiteLLM snapshot from 2026-07-08 (run online to refresh).

Run once without --pricing-offline to refresh the local cache from LiteLLM:

Terminal window
llm-usage monthly

If pricing still fails, check for a custom --pricing-url, a bad --pricing-overrides file, or a network failure while using a custom pricing URL. Custom pricing URLs use their matching cache or network source and do not fall back to the bundled default snapshot.

OpenCode runtime parsing is read-only and CLI-independent. For schema inspection, use OpenCode CLI tooling:

Terminal window
opencode db "select name from sqlite_master where type='table'"
opencode db --format json "<sql>"

Pin source and date range explicitly:

Terminal window
llm-usage monthly --source opencode --opencode-db /archives/opencode-2026-01.db --since 2026-01-01 --until 2026-01-31