A Terminal Protocol for Program Status (OSC 7501)
5.1 Key Insight: Programs already know their own state; OSC 7501 gives them a standard, PTY-native channel to broadcast it—eliminating the heuristic arms race that has emerged around agentic tooling.
Mitchell Hashimoto proposes OSC 7501, a new terminal escape sequence that lets programs report their current status—idle, working, blocked, done, or failed—directly to terminals and other tools. The motivation is that long-running terminal tasks (builds, deployments, coding agents) lack a standard way to communicate state, forcing agentic inbox tools to rely on brittle heuristics like regex-matching spinner characters or proprietary out-of-band socket APIs. OSC 7501 is terminal-native, transmitted over the existing PTY, and therefore works transparently across SSH and containers without extra infrastructure. The protocol is intentionally generic—key=value pairs, no SDK, implementable in a dozen lines of POSIX sh—and supports hierarchical task trees for programs managing multiple concurrent subtasks. Hashimoto has already implemented it in Ghostty and Rex, with proof-of-concepts in Terraform, Claude Code, Codex, and Homebrew.
8 Claude Code is considered 'working' if its window title starts with a Braille spinner character or, as of version 2.1.228, a half-circle one. The history of that file shows ten cha…
7 I'd like us all to stop guessing what programs are doing by reading their screens or process trees. The program already knows. Let's give it a way to tell us!
6 Trivial to script with plain old POSIX sh. No SDK, no sockets, no environment variables, no JSON.
GhosttyDeveloper Tools