Per-session savings attribution (x-claude-code-session-id)
Savings are tracked globally, per model and per project. When one long-lived proxy serves several concurrent agent sessions, /stats can't answer "what did this run save": every session is lumped together.
The harnesses already identify themselves per request. Claude Code stamps x-claude-code-session-id on every POST /v1/messages (one UUID per session), and headroom wrap can inject x-headroom-session-id for harnesses that don't send one of their own. So the signal is already on the wire; it just isn't recorded anywhere.
Proposal: attribute savings per session, keyed on x-claude-code-session-id with x-headroom-session-id as fallback. Concretely, a sessions map in the savings tracker mirroring the per-project map (same entry shape, same record path, bounded by idle eviction and a recency cap), an optional session field on savings_events.jsonl records, and GET /stats/sessions/<id> returning that session's row (loopback-only, same posture as /admin).
I have this working locally and will open a draft PR against this issue.
Source: headroomlabs-ai/headroom