Mitchell Hashimoto proposes OSC 7501 Program Status Protocol
A new terminal escape sequence (OSC 7501) allows programs to communicate their execution state directly to the terminal emulator.
Summary
Mitchell Hashimoto has introduced a new terminal-native specification called the Program Status Protocol (OSC 7501). The protocol enables long-running programs, such as build tools or AI agents, to report whether they are idle, working, blocked, finished, or in an error state via the pty. This aims to replace unreliable heuristics like screen scraping or non-terminal APIs with a standardized, machine-readable method.
Technical details of OSC 7501
- Uses the OSC 7501 escape sequence to transmit state via the pty.
- The payload consists of key=value pairs separated by colons.
- Required state values include: idle, working, done, blocked, and error.
- Supports optional keys such as app (machine-readable name) and msg (base64-encoded human-readable text).
- Allows for hierarchical IDs to report multiple concurrent tasks within a single program.
- Designed to be lightweight and compatible with existing terminal workflows without requiring SDKs or sockets.
Why it matters
The protocol provides a unified way for terminal emulators to display program progress and notifications, particularly benefiting 'agentic inboxes' that manage multiple AI coding agents.
Original reference: mitchellh.com →