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
Support Claude Code's Program Status Protocol (OSC 7501) for agent state
#5106
Claude Code 2.1.295 added a "Program Status Protocol": at startup it sends the query OSC 7501 ; ? to the terminal and, only if the terminal answers, reports its own state (working / waiting for the user / finished) through OSC 7501 sequences. herdr 0.9.3 does not answer the query, so Claude Code never turns the protocol on, and herdr's state for Claude Code panes comes from screen detection (agent-detection/claude.toml).
requested change
Answer the OSC 7501 capability query and map the states Claude Code reports to agent_status (working / blocked / done / idle), keeping screen detection as the fallback for programs that don't speak the protocol.
why you want this
We run many Claude Code sessions in herdr and drive them from scripts through the socket API (agent_status in pane/agent listings). Screen detection has to follow Claude Code's UI, which changes with almost every release, and it sometimes reports a pane as idle or done while a turn is still running (for example while a subagent or a background task works), so our automation can send new input on top of live work. State reported by Claude Code itself would remove that guesswork. Happy to test a pre-release build.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
idea / problem
Claude Code 2.1.295 added a "Program Status Protocol": at startup it sends the query
OSC 7501 ; ?to the terminal and, only if the terminal answers, reports its own state (working / waiting for the user / finished) through OSC 7501 sequences. herdr 0.9.3 does not answer the query, so Claude Code never turns the protocol on, and herdr's state for Claude Code panes comes from screen detection (agent-detection/claude.toml).requested change
Answer the OSC 7501 capability query and map the states Claude Code reports to agent_status (working / blocked / done / idle), keeping screen detection as the fallback for programs that don't speak the protocol.
why you want this
We run many Claude Code sessions in herdr and drive them from scripts through the socket API (agent_status in pane/agent listings). Screen detection has to follow Claude Code's UI, which changes with almost every release, and it sometimes reports a pane as idle or done while a turn is still running (for example while a subagent or a background task works), so our automation can send new input on top of live work. State reported by Claude Code itself would remove that guesswork. Happy to test a pre-release build.
All reactions