A Terminal Protocol for Program Status (OSC 7501)
The Program Status Protocol, identified as OSC 7501, has been developed to address the need for a terminal escape sequence that allows any program to inform the terminal about its current state. This state can be idle, working, waiting on the user, finished, or failed, along with an explanation for its status. The protocol was created in response to the limitations of existing approaches, which often rely on heuristics or require programs to integrate with multiple inbox-specific, out-of-band APIs.
These methods can be inconsistent, require extensive integration work, and lack a uniform, terminal-native solution. The Protocol is designed to be generic, terminal-native, and easy for developers to implement while providing a robust foundation for terminal applications to report their status. This includes details such as the program's name, a brief message, and hierarchical IDs for programs running multiple tasks simultaneously.
The specification also covers the lifetime of records, feature detection, terminfo, size limits, and security aspects. Implementations of this protocol have been created in various tools, demonstrating its versatility and ease of integration.
Written by urgent.news from Hacker News's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.
This story
This is one outlet's version. Read the fullest account.
- A Terminal Protocol for Program Status (OSC 7501) mitchellh.com