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
{{ message }}
Repository navigation
Feature Request: Emit OSC 7501 (Program Status Protocol) escape sequences for agent lifecycle state (idle, working, done, blocked, error) #1150
Please add support for emitting OSC 7501 (Program Status Protocol) escape sequences to the terminal during interactive CLI sessions (cmd / cmdc).
Why this matters:
Terminal multiplexers and agent orchestrators like Herdr (herdr-core), Ghostty, Otty, and Rex rely on OSC 7501 to track whether a coding agent is idle, working, done, or blocked (e.g., waiting on a permission prompt or question) without fragile screen scraping. Claude Code, Codex, Pi, and Antigravity already emit OSC 7501. Right now, running cmd / cmdc inside herdr-core results in "reported": false, "status": null permanently, which breaks hc wait and status indicators.
Implementation details:
The spec is tiny (usually <20 lines of code to write to process.stdout when process.stdout.isTTY is true):
Spec: ESC ] 7501 ; state=<idle|working|done|blocked|error>:app=command-code[:kind=permission|question|auth][:msg=<base64>] ESC \
Emit state=idle on startup / ready
Emit state=working when a turn/run begins
Emit state=blocked:kind=permission (or question) when waiting on user approval in the TUI
Emit state=done (or error) when a turn finishes
Use Case
When spawning multiple instances of Command Code (cmd / cmdc) as parallel sub-agents inside Herdr (herdr-core) or terminal multiplexers (tmux), it becomes impossible to track whether each worker is actively working, finished with its turn, or stuck waiting on a permission prompt without brittle screen scraping. Right now, herdr-core detects cmdc as an agent process, but its status remains permanently null (reported: false), causing event-driven orchestration (hc wait / hc send --wait) to time out and forcing orchestrators to rely on hacky screen-quiescence polling. Emitting OSC 7501 (idle, working, done, blocked, error)—like Claude Code, Codex, Pi, and Antigravity already do—would allow terminal UIs and multi-agent orchestrators to supervise multiple Command Code instances natively and reliably.
Activity
vipulgupta2048 commentedon Nov 17, 2026
Thanks for the feature request @biryaniwithachaar testing this out on herdr
biryaniwithachaar commentedon Nov 17, 2026
Cool