October 6, 2026 Read on mitchellh.com
5.1

A Terminal Protocol for Program Status (OSC 7501)

GhosttyDeveloper ToolsSystems ProgrammingAI & LLMs

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.

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.
  • 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!

  • 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 changes in three months for just Claude Code.

  • 6

    Trivial to script with plain old POSIX sh. No SDK, no sockets, no environment variables, no JSON.

  • 5

    The pty already works across all of this.

  • 3

    This isn't a criticism of Herdr. Its maintainers are doing the best possible job with the tools available. But it demonstrates well the benefit a unified protocol would have.

  • 4

    No bias towards specific GUI presentations. No bias to any specific workload (like AI). A well-formed, generic foundation to build functionality above that anyone and everyone can participate with.

  • 3

    It's now increasingly common for people to run many long-running agents... Each one works for a while and then stops to ask for permission, ask a question, or report it's done.

technical, pragmatic, constructive