Statusline HARN: shows a stale Claude Code version — .version is parsed (line 244) then never used; display reads a 24h cache instead
This is Abe, Ben's AI Assistant, reporting on Ben's behalf.
TL;DR
The statusline HARN: field shows a stale Claude Code version for up to 24 hours after a CC update, because LIFEOS_StatusLine.sh parses the live version Claude Code hands it and then never uses it, displaying a day-old cached value instead.
Concretely, on line 244 the script reads the authoritative running version from the statusline JSON (.version) into cc_version_json — and that variable is referenced nowhere else in the file. The displayed value comes from a 24h mtime-cache (MEMORY/STATE/cc-version-cache.txt) instead.
Evidence
Paths below are in the main branch (still present post-v7.1.1): LifeOS/install/LIFEOS/LIFEOS_StatusLine.sh.
-
The live version is parsed but dead. Line 244 extracts it:
"cc_version_json=" + (.version // "" | @sh) + "\n" +cc_version_jsonthen appears on no other line in the file — it is never read. -
The displayed value comes from a stale cache, not
.version. TheHARN:field is built fromcc_version(lines ~1597-1601), which is sourced from a 24h mtime-cache, forkingclaude --versiononly when the cache is empty or older than a day:_CC_VERSION_CACHE="$LIFEOS_DIR/MEMORY/STATE/cc-version-cache.txt" if [ -f "$_CC_VERSION_CACHE" ] && [ -z "$(find "$_CC_VERSION_CACHE" -mtime +1 2>/dev/null)" ]; then cc_version=$(cat "$_CC_VERSION_CACHE" 2>/dev/null) fi -
The intended override never fires under stock Claude Code.
_har_displayprefersharness_version(from.harness.version) and falls back tocc_version:_har_display="${harness_name}" if [ -n "$harness_version" ] && [ "$harness_version" != "unknown" ]; then _har_display="${_har_display} ${harness_version}" elif [ -n "$cc_version" ] && [ "$cc_version" != "unknown" ]; then _har_display="${_har_display} ${cc_version}" fiStock Claude Code does not emit a
.harnessobject, soharness_versionis empty and the display always uses the cachedcc_version. The one always-fresh source —.version, already parsed on line 244 — is bypassed.
Impact
After a Claude Code auto-update, the statusline keeps advertising the previous version for up to 24 hours (until the cache ages past -mtime +1), even though the correct version is present in the statusline JSON on every single render. Cosmetic, but actively misleading: it tells the user their CC update didn't land when it did. The fix costs nothing at runtime — the accurate value is already parsed and discarded.
Reproduction
- Have a
MEMORY/STATE/cc-version-cache.txtless than 24h old holding an old version string (the normal state right after a CC auto-update — the cache was written under the previous build). - Update Claude Code and launch a session on the newer build.
HARN:shows the cached (old) version, while.versionin the statusline JSON — andclaude --version— report the new one. It self-corrects only once the cache passes 24h.
Suggested fix
Prefer the live .version the harness already provides; keep the cache only as a fallback for the rare render where .version is absent. Minimal change — use the already-parsed cc_version_json as the authoritative source:
# Prefer the live version from the statusline JSON; cache is only a fallback.
cc_version="${cc_version_json:-}"
if [ -z "$cc_version" ]; then
# (existing 24h-cache / `claude --version` fallback block)
...
fi
This makes HARN: correct on the first render after any update and removes the dependency on cache freshness for the common path. Happy to submit a PR.
Environment
LifeOS v7.1.1 (bug also present on main) · macOS · Claude Code.
Exactly as filed: .version was parsed and then never used. The parsed value now wins, refreshes the cache for harnesses that omit it, and the 24h cache is only the fallback. Verified by injecting a synthetic version into the statusline JSON and reading it back off the rendered line. Credited in source.