01
OSC 7501 — a terminal escape sequence for "working," "blocked" and "done"
OSC 7501, the Program Status Protocol, is a short specification Hashimoto published on Tuesday. A program writes ESC ] 7501 ; state=blocked:kind=permission:app=terraform:msg=<base64> ESC \ to its own terminal, and the terminal, or any tool reading the pty, decides how to show it: a notification, a status icon, an inbox row. The states are idle, working (with an optional progress percentage), done, blocked (with kind set to permission, question or auth) and error. Hierarchical ids let a deploy report us-east at 40% while eu-west waits for approval. The post's example integration is a five-line POSIX shell function wrapped around rsync, with no SDK, socket or JSON.
The argument is against the two approaches inboxes use now. Screen-scraping heuristics break with every release, and per-inbox sockets mean every program integrates with every inbox and nothing works over SSH or from a container without bridging. The pty already crosses all of those. Hashimoto has implemented it in libghostty and in Superlogical's Rex, and as proofs of concept in Terraform, Claude Code, Codex and Homebrew, each in "no more than a dozen lines." Pi's terminal docs already list it: blocked when a dialog or login waits, done when a run finishes. In the thread, one commenter argued that kind := permission | question | auth gives away that the spec is shaped around TUI agents; another warned that more in-band signaling is a security problem, and that a lockable way to query process state would be safer. A third pointed out that BSD's ^T/SIGINFO has answered "what are you doing" for decades, just as a pull rather than a push.
Reach for it if you write a long-running CLI, or build anything that hosts terminals and has to guess when they want a human. Delete the regex that watches a window title for a Braille spinner. Tradeoffs: it is a spec from Tuesday, implemented so far in libghostty and Rex, and the Claude Code and Codex support is Hashimoto's own plugins and forks, not upstream; unsupported terminals should ignore it but older and serial terminals may not; and commenters doubt that the kind values generalize beyond agents.