# Programs Already Know Their Status. A New Terminal Protocol Lets Them Tell Us.

Original title: A Terminal Protocol for Program Status (OSC 7501)

> Hacker News story 49984159 · language: en · submitted 2026-10-06
> Web version: https://zeli.app/story/49984159
> About this feed: https://zeli.app/llms.txt · Agent guide: https://zeli.app/skill.md

▲ 174 · by [mfiguiere](<https://news.ycombinator.com/user?id=mfiguiere>) · 💬 52
[original](<https://mitchellh.com/writing/program-status-osc7501>) · [HN discussion](<https://news.ycombinator.com/item?id=49984159>)

## Summary

Mitchell Hashimoto proposes OSC 7501, a terminal-native protocol for programs to report their status: idle, working, blocked, done, or error. It uses simple key=value pairs over the pty, avoiding fragile screen-scraping heuristics and per-tool APIs. The spec includes hierarchical task IDs and base64 messages, and is already implemented in Ghostty, Rex, Terraform, and Claude Code.

## Key quote

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

## HN discussion (52 comments)

### [drewg123](<https://news.ycombinator.com/item?id=50012691>)

> The BSDs have had a version of this for many, many years.  If you hit ^T on the terminal, you deliver a SIGINFO to the application you're waiting for. By default, you get the program name, what its blocked on, and info about real/user/sys time and memory use.
>
> Starting an emacs window in the fg:
>
> % emacs
>
> ^T
>
> load: 0.32  cmd: emacs-31.1 64938 [select] 2.89r 0.75u 0.06s 6% 122404k

### [Vegenoid](<https://news.ycombinator.com/item?id=50013800>)

> I like the idea, but we already have the terminal bell. In my setup, when an agent is done or needs something, it emits a bell. Based on config, this results in a desktop notification if I’m not in the terminal, or a toast from my multiplexer if I’m in the terminal. The terminal pane gets a colored “bell” icon in its title that is cleared when I attach to it.
>
> The total lack of mention of the terminal bell in the article is weird. I think it needs to be addressed for the protocol to be taken seriously. More granular info sounds nice, but also nice is the simplicity of the bell.

### [eschaton](<https://news.ycombinator.com/item?id=50014131>)

> How does this compare to setting the status line on a terminal that supports one?

### [bugcheck7b](<https://news.ycombinator.com/item?id=50013904>)

> Cool to see this, I've been toying around with custom notification OSCs through zellij and ghostty.
>
> Totally going to extend this for myself with a custom key that encodes a reverse route on each hop so I can easily jump to the window/tab/pane that emitted it, or send back custom actions into a given pane like a permission approve/deny.

### [weinzierl](<https://news.ycombinator.com/item?id=50012244>)

> I've been using a poor mans version of this for decades.
>
> My iTerm2 is configured to show activity, new-output and visual bell in the tab. On Linux I have an approximation for WezTerm.
>
> I have a bell command that I can use in a pipeline or sequence to produce the bell on events I'm interested in. Trivial case is when a program finishes.
>
> I have a fancy alias that can be used in a shell command sequence and which produces different sounds depending on the exit status of the preceding command in addition to sending the terminal bell.

---

## Cite

- Page: https://zeli.app/story/49984159
- Date: 2026-10-06
- Source: mitchellh.com (https://mitchellh.com/writing/program-status-osc7501)
- Hacker News: https://news.ycombinator.com/item?id=49984159

## Other languages

- zh: https://zeli.app/zh/story/49984159 · markdown: https://zeli.app/zh/story/49984159.md
- ja: https://zeli.app/ja/story/49984159 · markdown: https://zeli.app/ja/story/49984159.md
- ko: https://zeli.app/ko/story/49984159 · markdown: https://zeli.app/ko/story/49984159.md
- de: https://zeli.app/de/story/49984159 · markdown: https://zeli.app/de/story/49984159.md
- es: https://zeli.app/es/story/49984159 · markdown: https://zeli.app/es/story/49984159.md
- ru: https://zeli.app/ru/story/49984159 · markdown: https://zeli.app/ru/story/49984159.md
