Expand description
Live stock-Codex session discovery.
Codex does not publish a peer registry or a supported attachment endpoint, but its process keeps every rollout it currently owns open. This module joins that process-owned file descriptor back to the persisted catalog path. The rollout’s last explicit lifecycle event then distinguishes an executing turn from a merely running session. No timing or CPU heuristic is used.
A turn waiting on an approval writes nothing to its rollout: the request
goes to the app-server’s connected client and, when that client has gone,
to no one, so the rollout reads as a turn still executing. For the threads
Codex’s shared app-server daemon has loaded, its own thread/read status
(active with waitingOnApproval or waitingOnUserInput) is asked over
the daemon’s control socket and wins over the rollout.
Enums§
- Codex
Peer Status - Activity proven for a rollout owned by stock Codex.
Functions§
- holds_
session - Whether
pidholds the rollout of Codex sessionsession_idopen. - launched_
session - The Codex conversation a launch in
cwdstarted: the newest root rollout undersessions_root(YYYY/MM/DD/rollout-*.jsonl) written sincesincewhose first record namescwd. A launch is bound by this record of its own rather than by the process, open-file and pane chain, which missed both Codex launches of 2026-10-02 within a minute though their rollouts existed in two. - live_
rollouts - Every Codex rollout currently held open by a stock
codexprocess, with the narrowest activity state its own event stream proves. - resumed_
session_ of_ process - The conversation a
codex resume <id>process continues, read from its command line: a resumed conversation that has not written since holds no rollout open, so the rollout cannot name it. - rollout_
cwd - The working directory a rollout’s conversation runs in, from its first
session_metarecord. - rollout_
of_ session - The rollout file of conversation
session_idunder Codex’s sessions root (YYYY/MM/DD/rollout-…-<id>.jsonl). - rollout_
session - A rollout’s session id and, for a subagent thread, its parent’s id.
- rollout_
status - Activity for a discovered catalog path owned by a currently running Codex.
- session_
of_ process - The Codex session a process runs: the root rollout (one with no parent
thread) among the files
pidholds open, as(session id, rollout path).Nonewhenpidholds no Codex rollout. - session_
panes - The machine daemon pane each Codex conversation runs in, by session id: the pane the daemon
names in the environment it gives every pane (
SUPERCODE_TEAMS_PANE), read from thecodexprocess that holds the conversation’s rollout. A conversation outside any daemon pane (or held only by the shared app-server) has none.