Files
Adam Clarke 6891def8a7 fix(statusline): resolve session id from stdin payload so per-session KPI renders (#797)
resolveSessionId() read CLAUDE_SESSION_ID (an env var Claude Code never sets)
and otherwise fell back to a /proc PID walk (`pid-<n>`), while discarding the
stdin JSON payload it parses. The recording hooks key session_events by the
Claude session UUID delivered in that payload's `session_id`, so `pid-<n>`
never matched -> sessionBytes was always 0 -> the bar always rendered the
global lifetime aggregate, identical in every session.

Read session_id from the stdin payload first, then env, then PID walk (a strict
superset of prior behavior). Widen the test harness to send a stdin payload and
add a mutation-defeating regression test for the production path.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-21 13:44:55 +03:00
..