Observability and cost tracking for opencode

See every opencode session, tool call, and token as it happens. ClawMetry reads the opencode SQLite store under ~/.local/share/opencode and renders sessions, tokens, cost, and per-provider routing in one dashboard. No SDK.

Supported runtime Reads opencode SQLite session store Read-only Free trial

What ClawMetry sees on opencode

ClawMetry's opencode adapter opens the store opencode already writes (~/.local/share/opencode) in read-only mode and surfaces:

Source: the adapter is at clawmetry_pro/adapters/opencode.py. Every parse rule and every SQL SELECT is in that file.

Enable it in about two minutes

1. Install ClawMetry

Pick the line that matches your OS. Windows users: paste the install.cmd line, not the shell one.

# macOS or Linux
curl -fsSL https://clawmetry.com/install.sh | bash
# Windows (cmd.exe or PowerShell)
curl -fsSL https://clawmetry.com/install.cmd -o install.cmd && install.cmd

2. Run the daemon

clawmetry

The daemon auto-detects opencode's local store and starts reading immediately.

3. Open the dashboard

Open http://localhost:8900. Switch the runtime chip to opencode.

Start the free trial →

The one thing this catches that opencode alone does not

Left alone, opencode's failure mode is a fanned turn charged three times because every provider took the request. ClawMetry watches for it: cost per hour on the opencode runtime, message-repeat detection, and per-session token-growth curves. Set a threshold, and the approval queue pauses before the next call. Kill switch (Pro) stops it.

All 19 runtimes ClawMetry observes

opencode is one of 19. Free on every plan: OpenClaw, NVIDIA NemoClaw. Paid on Cloud Pro or Self-Hosted Pro: the rest.

OpenClaw NVIDIA NemoClaw NanoClaw PicoClaw Claude Code Codex Cursor Aider Goose opencode (this page) Qwen Code Hermes Pi Deep Agents n8n Antigravity GitHub Copilot Grok QM