Whole file

joeynyc/hermes-hud

The author described this change as fix: read current Hermes session model column. It counts as a record because the check below fails on the code as it stood at 541bfe7cb and passes on 9352d04cc, with nothing else changed between the two runs.

Fix saved2026-05-08
Sharing licenceMIT · LICENSE
Change size+3 3

What the code was meant to do, written into the code itself as a save note

fix: read current Hermes session model column

The change

6060 message_count, tool_call_count,
6161 input_tokens, output_tokens,
6262 cache_read_tokens, cache_write_tokens,
63- reasoning_tokens, estimated_cost_usd, model_config
63+ reasoning_tokens, estimated_cost_usd, model, model_config
6464 FROM sessions
6565 ORDER BY started_at DESC
6666 """)
7373 ended = datetime.fromtimestamp(ended_raw) if ended_raw else None
7474
7575 # Try to extract model from model_config JSON
76- model = None
76+ model = safe_get(row, "model")
7777 mc_raw = safe_get(row, "model_config")
78- if mc_raw:
78+ if not model and mc_raw:
7979 try:
8080 mc = json.loads(mc_raw)
8181 model = mc.get("model") or mc.get("default")

The check that tells the two apart

failpass·tests/test_collectors.py::TestSessionsCollector::test_session_model_uses_schema_column

Check file tests/test_collectors.py, taken without changes from the fix and copied onto the older code, so the exact same check runs against both versions.

Origin and history

The code before it541bfe7cb7dcbe1a355eaeafd136ad35d27e0f1d
Broken version dated2026-04-17
Modulehermes_hud.collectors.sessions
Units changedcollect_sessions
Fingerprintdee728eb7540c326
Checked2026-08-18 by goldset/0.1

Every field above is generated by our program. None of it is written by hand.