CClawMetryDocs

Runtime reference

GitHub Copilot#

Copilot CLI keeps a full event log per session plus a SQLite usage ledger. Because Copilot bills in AI credits and the ledger records them exactly, cost here is vendor-billed truth rather than a per-token estimate.

Runtime idcopilot
CategoryTerminal coding agent
VendorGitHub
TierPaid tier (Starter and up)
Upstreamgithub.com/features/copilot

Where the data comes from#

ClawMetry reads these locations, in order, and never writes to any of them.

  • ~/.copilot/session-state/<uuid>/events.jsonl — full event log
  • ~/.copilot/session-state/<uuid>/workspace.yaml — session metadata
  • ~/.copilot/session-store.db — SQLite index and usage ledger

Format. JSONL events ({type, data, id, timestamp, parentId}) plus a WAL-mode SQLite index.

Environment variables#

VariableEffect
CLAWMETRY_COPILOT_HOMEhome override

See Environment variables for the variables that apply to every runtime.

Tokens and cost#

Tokens. Real, from the assistant_usage_events ledger, with input, output, cache read, cache write and reasoning splits.

Cost. Vendor-billed: total_nano_aiu is the CLI's displayed credits times 1e9, and one credit is one US cent.

Why this section exists

Runtimes differ enormously in what they persist. Rather than showing a plausible number everywhere, ClawMetry reports what the store actually contains and marks the rest unknown. A cost of $0.00 and a cost of unknown mean different things, and the dashboard keeps them different.

Sub-agents and delegation#

Custom agents run inside the parent session — no child transcript is ever written. ClawMetry synthesises a child session per subagent.started, and the ledger's initiator='sub-agent' rows split child spend out of the parent rather than double-counting it.

Things worth knowing#

  • input_tokens in the ledger already includes cache reads and output_tokens already includes reasoning tokens. ClawMetry reports uncached input plus a separate cache split so the UI does not double-count.

Verify it is being read#

bash
# Is this runtime detected, and would this install unlock it?
clawmetry runtimes --json | jq '.runtimes[] | select(.id=="copilot")'

# Why is it locked, if it is?
clawmetry runtimes --why copilot

# Any sessions ingested yet?
curl -s 'http://localhost:8900/api/local/sessions?limit=5' \
  | jq '.rows[] | {session_id, agent_id, events, cost_usd}'

If detection succeeds but no sessions appear, work through Troubleshooting — the usual causes are a relocated data directory (set the override above), a session limit that is hiding older runs, or a runtime that simply has not written anything yet.

Cookie preferences