Expand description
Scan ~/.claude/state/ for markers that tell us what’s blocked, what has
an active intent, and which repos have a fresh review marker.
Marker schemes mirror ~/.claude/hooks/_lib.sh::repo_hash (first 12 chars
of MD5 of the repo root path string). We deliberately re-implement the
hash rather than shelling out to keep this read-only and fast.
Structs§
- Claude
State Markers - Snapshot of the marker files we care about.
- Codex
Job - One row from a codex-companion workspace’s
state.json::jobs[]. The companion writes one workspace directory per repo, each with a singlestate.jsoncarrying the full job history — we filter to the still- active ones so the dashboard isn’t dominated by completed tasks.
Constants§
- CODEX_
JOB_ MAX_ AGE_ MS - Heuristic: how long can a job sit in non-terminal status before we stop trusting the file? Real codex tasks finish in seconds-minutes; anything past an hour is almost certainly a zombie left by a codex-companion crash that never wrote the terminal status.
Functions§
- codex_
jobs - Enumerate currently-active codex-companion jobs across every workspace
directory.
state.jsonis the source of truth; directory mtime is no longer trusted as a job signal. - codex_
jobs_ in - find_
repo_ root - Walk parents of
pathuntil a.gitentry is found; returns that directory.Noneif not inside a git repo (or if I/O fails). - repo_
hash - Compute the same 12-char marker hash that
~/.claude/hooks/_lib.shwrites. - scan
- scan_
dir - state_
dir