Skip to content

The era of guessing Agent status from the terminal is coming to an end, as Claude Code and Codex successively follow up with OSC7501.

Oct 14, 15:00

Beating AI News Flash: OSC 7501, a terminal state protocol proposed by Ghostty author Mitchell Hashimoto, has been progressively adopted by mainstream Coding Agents. Anthropic's Claude Code v2.1.295 and xAI's Grok Build v1.0.52 have officially added support, while OpenAI has also merged Codex's adaptation code on GitHub, though it has not yet entered the latest stable release.

OSC 7501 allows Agents to proactively tell the terminal whether they are working, waiting for the user, finished, or have encountered an error. For example, when Claude Code is stuck on a permission confirmation, the terminal can directly recognize the waiting state, eliminating the need to judge based on loading animations and on-screen text.

Other open-source Agents are also following suit. Pi v1.1.0, Crush v0.98.0, Oh My Pi v18.8.7, and Docker Agent v1.150.0 have all added support.

OpenTUI, the terminal interface framework used by OpenCode, has also added the OSC 7501 interface in version 0.6.3, though the adaptation code for OpenCode itself has not yet been merged.

On the terminal side, Rex, cmux, TUIOS, and others are already able to receive these states, reducing the need to maintain separate detection rules for different Agents.

Source