Article

Ghostty author proposes OSC 7501, letting programs tell the terminal what they are doing

Beating AI news flash: Mitchell Hashimoto, Ghostty author and HashiCorp co-founder, has proposed a new terminal protocol OSC 7501.

Once programs such as Claude Code, Codex, and Terraform are running, external tools often do not know whether they are working, waiting for input, or already finished, and can only guess.

Tools such as Herdr currently read the terminal screen, window title, and process, then use rules to determine the agent's state. Mitchell said, for example, that Herdr maintains 16 rules just to identify Claude Code; over the past 3 months, these rules have been changed approximately 10 times. A change to Claude Code's loading animation could require a new adaptation. He also said that he found 250 Agent orchestration tools, many of which are repeatedly solving similar problems.OSC 7501's approach is to have programs report their own status. A program can tell the terminal that it is idle, working, waiting for the user, completed, or in error, and can also attach progress information and explain why it is waiting. For example, when Claude Code is stuck awaiting permission confirmation, it can directly tell the terminal “I am waiting for authorization,” instead of making Herdr infer this from text and symbols on the screen.

These states are transmitted through the terminal connection that the program is already using, so SSH and containers can also work normally. Existing terminal progress protocols can express only busy, progress, or error states, and do not clearly indicate what the program is waiting for.OSC 7501 fills this gap.

Mitchell has implemented the protocol in libghostty and Rex, and created proofs of concept for Terraform, Claude Code, Codex, and Homebrew through plugins or fork. Integration is not complicated; each implementation is no more than a dozen lines of code. However, whether OSC 7501 can achieve widespread adoption will depend on whether other terminals and programs are willing to adopt it.

Original link https://m.theblockbeats.info/flash/370538