--- title: NanoClaw description: How ClawMetry observes NanoClaw — where its data lives, the environment variables that move it, what cost data is real, and the traps in its store. eyebrow: Runtime reference --- # NanoClaw NanoClaw gives each session its own pair of SQLite files — one the host writes and one the container writes — and reconstructs a transcript by merging them. Token data arrives indirectly, through the Claude Code state the host bind-mounts into the container. | | | |---|---| | **Runtime id** | `nanoclaw` | | **Category** | Containerised agent runtime | | **Vendor** | Nanoco | | **Tier** | Paid tier (Starter and up) | | **Upstream** | [github.com/nanocoai/nanoclaw](https://github.com/nanocoai/nanoclaw) | ## Where the data comes from ClawMetry reads these locations, in order, and never writes to any of them. - `/data/v2-sessions///inbound.db` — host writes - `/data/v2-sessions///outbound.db` — container writes - `/v2-sessions//.claude-shared/projects/…` — mounted Claude state **Format.** Two SQLite files per session; `seq` is unique across both tables (host writes even numbers, container odd), so a transcript is a merge sort on `seq`. ## Environment variables | Variable | Effect | |---|---| | `CLAWMETRY_NANOCLAW_DIR` | point at a v2-sessions dir or a checkout root | See [Environment variables](/docs/config/environment/) for the variables that apply to every runtime. ## Tokens and cost **Tokens.** Not in the message tables. Real counts come from the bind-mounted Claude Code transcripts when the install is new enough to have them. **Cost.** Derived from the mounted Claude transcripts. Installs older than the bind-mount degrade to a message-only view with no cost. :::note 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 Through the mounted Claude state. ## Things worth knowing - There is no `NANOCLAW_HOME`, no `DATA_DIR` and no `~/.nanoclaw`. The data dir is resolved relative to the install CWD, so the real path is `/data/v2-sessions`. ClawMetry discovers it from a bounded set of common checkout locations. - The runtime actively owns these files, so ClawMetry always opens them read-only and immutable. ## Verify it is being read ```bash # Is this runtime detected, and would this install unlock it? clawmetry runtimes --json | jq '.runtimes[] | select(.id=="nanoclaw")' # Why is it locked, if it is? clawmetry runtimes --why nanoclaw # 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](/docs/ops/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.