
27 October 2026 · 2 min read
Hooks First, Transcript as Fallback: Two Layers of Truth for Agent Status
Running several Claude Code sessions in parallel means losing track of which one is working, which one is stuck on a permission prompt and which one has been idle for twenty minutes. working-agents answers that at a glance: a small local web app that turns each session into a character walking around a six-room pixel office, updated in real time from the data on disk.
The interesting part is not the sprites. It is how the app decides a session's status.
Layer one: hooks#
Claude Code can call a command on events such as SessionStart, PreToolUse, PostToolUse, PermissionRequest, Notification, Stop, SubagentStart/SubagentStop and SessionEnd. An install script wires those to a tiny hook script that POSTs each event to the local server. This is the precise source: a permission request is a permission request, not an inference. A hook event less than 20 seconds old wins over anything else.
Layer two: the transcript#
Hooks are not always there. They might not be installed, or the server might not have been running when they fired. But every session already writes a JSONL transcript under ~/.claude/projects, so the parser can infer status from that file:
- a recent turn means working;
- a
tool_usewith no matchingtool_resultmeans waiting, because something asked for a tool and nothing has answered; - silence for more than five minutes means idle.
Why not just one#
Hooks alone fail silently when they are not set up. The transcript alone is ambiguous: a long-running tool call and a stuck prompt can look similar from the outside, and nothing in the file says "the user just approved". Letting a fresh hook override the heuristic gives precision when it is available and a reasonable answer when it is not. The same idea is common across the small genre of tools that visualise Claude Code activity.
Movement and cost#
Characters move on a small waypoint graph rather than a full pathfinding grid: each room has a door connected to a central hallway, so you see an agent walk out of one room, across the hallway and into another. Each character also carries its session's real token counts, read from the transcript and priced against per-model rates, and the app flags figures that are estimates.
It runs locally, with no cloud service involved, and the source is on GitHub.