You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Browse filesBrowse the repository at this point in the historyBrowse files
BrainyBlaze Ops
committed
state: track busy/idle from agent CLI's OSC 0 title
Both codex and claude write the current activity into the terminal
window title via OSC 0. While the agent is working, the title is
prefixed with a UTF-8 braille spinner glyph (U+2800..U+28FF + space);
when it goes idle the prefix drops (codex emits bare project name,
claude emits "✳ <subject>"). The convention is reliable across
agents and repeats on every turn — unlike claude's one-shot CSI
"\x1b[>0q" init marker we previously used.
tstate_scan now also parses OSC 0 (terminated by BEL or ST) and
classifies each title as busy iff its first UTF-8 code point is in
the braille range. master.c installs a state-change callback that
persists the result to `<sockname>.state` (single line, "busy" or
"idle"). New CLI `atch state <session>` reads that file and prints
`busy` / `idle` / `unknown` (unknown for sessions with no title yet
or that are gone).
Cleanup: `cleanup_session()` unlinks the sidecar on master exit;
`rm_main` removes it alongside socket+log in both single and -a modes.
Bumped to 1.3-bb1. Existing tests still pass (229/229) and the new
state file appears + tracks transitions in a smoke probe against
codex 0.132.0.
0 commit comments