diff --git a/docs/web-ui/agent.md b/docs/web-ui/agent.md index 3d93cfef..1b521206 100644 --- a/docs/web-ui/agent.md +++ b/docs/web-ui/agent.md @@ -393,7 +393,15 @@ hit-rate** (`cache_read` over all input-side tokens) and **tokens/turn**. When `reminder_stats` is present (fetched via `ReminderRollup` RPC and merged into the snapshot in `web_ui.rs::api_stats`) three more chips appear: **reminders -scheduled / delivered / pending** for the window. +scheduled / delivered / pending** for the window. When the +per-session capture has data, a **first-turn ctx** chip shows the +input tokens of the most recent fresh claude session's first turn — +a proxy for system-prompt + CLAUDE.md sprawl (a fresh session's first +turn pays the full static prefix uncached). It's derived in `stats.rs` +(`first_turn_ctx`: the first turn, `ORDER BY started_at LIMIT 1`, of +the latest `sessions` row in the window) and is omitted from the JSON +until the `sessions` / `turn_stats.session_id` capture has rows — so +the chip stays hidden on older dbs (inert-until-capture). `stats.rs` opens the sqlite db read-only and degrades to an empty snapshot on any error — the page is decorative, never authoritative.