Repository navigation
[idea] Support OSC 7501 program status for Pi and read-only dashboards #5073
Replies: 5 comments
|
Suggest treating this as the umbrella for OSC 7501 itself, independent of any one agent. The Program Status spec (Mitchell Hashimoto, rationale) is general-purpose; Pi 1.1.0 and Claude Code 2.1.295 already emit it, both gated on a reply to Related threads asking for the same thing per agent: #5106 (Claude Code), #5107 (ZCode, see comments), and the closed #5069. @Ancienttwo would you consider retitling to "Support the Program Status Protocol (OSC 7501) as an agent-agnostic state source"? Minimal ask:
|
|
+1. A concrete case this would fix: #1853 (pane stays in the wrong state during pi compaction). Pi 1.1.0's OSC 7501 reporter covers this without a herdr-side pi integration:
Every compaction start has a matching end report, so the stuck- Note that pi only emits after the terminal answers |
|
Field report from a Pi-inside-herdr setup, in case it helps scope the receiver. We run pi 1.1.0 inside herdr 0.9.3 (
What it would buy us concretely: pi-subagents 0.77.0 reports each background subagent run's state through this protocol ( One note for the handshake work: answering the query is the gate, consuming the records is the value. Answering without consuming would make every conforming program emit into a void — harmless, but screen detection would remain the only source, so the structured state this discussion asks for still would not exist. |
Uh oh!
There was an error while loading. Please reload this page.
idea / problem
Pi 1.1.0 added OSC 7501 program-status reporting and normally waits for the terminal's support-query reply before sending it: https://github.com/earendil-works/pi/releases/tag/v1.1.0
Could Herdr consume this protocol so panes and external dashboards can distinguish working, waiting for input, completion, and failure without relying on screen text?
The OSC observer at master commit 4dc23bb currently handles 0/2/9:
herdr/src/pane/osc.rs
Lines 494 to 528 in 4dc23bb
Moving the request to Ideas as directed in #5069: #5069. Related dialog-detection discussion: #1346.
requested change
Support the OSC 7501 query/reply handshake and bounded parsing of its six state values: idle, working, blocked, done, error, and clear (which removes records).
Preserve typed blocked reasons (permission/question/auth), safe display text, record IDs, and pane/source provenance. Follow the protocol's replacement, clearing, process-exit, shell-prompt, and reset lifetimes so stale state cannot leak into a new session.
Define precedence and deduplication with existing Pi lifecycle hooks and screen detection, including how to avoid duplicate notifications. Expose the resulting status, reason, provenance, and freshness through pane snapshots and change events for read-only consumers.
Protocol reference: https://www.superlogical.com/rex/docs/build/program-status
why you want this
A read-only Kanban/status view could show which panes are running, need attention, or have a result to inspect, with a structured reason instead of guessing from terminal output. Program-reported done/error would remain a status signal; accepting a task as complete still needs separate validation. Existing integrations should continue to work.
All reactions