The rules that a tool uses to find an agent process, to link it to its
session, and to read its state. Each rule names its source:
"fact NNN": measured in this repository.
"aw": reported by the aw tool (v0.40.0, 2026-10-31) for Claude Code
2.1.309 to 2.1.314, codex-cli 0.163.0 and 0.164.0, agy 1.4.5 and 1.4.7,
cursor-agent 2026.10.22-27dcf5f and psmux 3.4.0. This repository did not
measure a rule that has only this source.
"aw v0.42.0": reported by aw on 2026-11-01. This repository did not
measure it.
What each OS gives
OS
Process data
Open files
Source
Linux
/proc: name, arguments, tty, folder, environment of own processes
On macOS, the process name of a native Claude Code install can be its
version, for example 2.1.309 (aw).
On macOS, aw reads the folder and the open files of a process with
proc_pidinfo, and uses lsof when that fails. aw did not measure this
on a real Mac (aw v0.42.0).
A tool reads the version of an agent from its install path or a version
file, and does not run <agent> --version (aw v0.42.0). The probes of
this repository run --version; the agent kit doctor will not.
Claude Code
Step
Rule
Source
Find
The process name or the program name is claude (claude.exe on Windows), or the program is .../claude/versions/<version>, or the first argument of a node process ends in claude.
aw compares procStart with the start time of the process on Linux and on Windows (the Windows file-time form matches). On macOS no form matched yet, so aw checks the pid only there. The kit prints the candidate forms on macOS (probes/claude/unix.sh); a run on a real Mac is open.
aw v0.42.0
Link
A .key file with no .json file: the trust question waits, or the process has just started.
The app-server daemon: app-server with --managed-daemon, or app-server daemon. On Windows, a scan with no arguments can skip it by its path: ~\.codex\packages\app-server-daemon\releases\.
Folder rules: one Codex process in the folder, one rollout with the same cwd in session_meta, started after the process. Day folders in local time and in UTC.
The last turn record of the rollout file: task_complete = idle, turn_aborted = idle, *_call = busy. The tool call is written before the approval, so the file never shows a permission wait.
On the screen: "esc to interrupt" = busy; ? for shortcuts = idle. While Codex 0.164.0 streams an answer, the screen can look idle; an open turn in the rollout file then means busy.
On the screen: "Run this command?" with (y) … (esc or n) = permission; ctrl+c to stop or a spinner = busy; the placeholder Plan, search, build anything or Add a follow-up in the box = idle.
aw
State
The transcript ends with {"type": "turn_ended", "status": "success"} after a turn.
These need a measurement on a real machine. The roadmap tracks them.
Codex 0.164 and later: the records during a streamed answer, and the
time to task_complete.
Codex: the open files after /new and /resume; the effect of -C on
the process folder; the parent of codex-linux-sandbox.
Windows: the link type of the Codex install path
~\AppData\Local\Programs\OpenAI\Codex\bin\codex.exe.
Cursor: the chat database after /new-chat and --resume; a
turn_ended record after an interrupt; the parent of worker-server;
the project folder name for spaces, dots and Unicode.
Claude: status and waitingFor during a plan approval and an
AskUserQuestion dialog; how long a .key file is alone; the pid file
after a crash.
agy: a transcript record for a permission wait; the open files with
--continue and --conversation <id>; which presence lock belongs to
the live process on Windows.
macOS: the time of lsof -p for one process; the terminal names of
iTerm2, VS Code and the Cursor editor.
Windows: whether a process of the same account can read the command
line and the folder of another process without administrator rights.