^[control-codes live in libghostty-vt

Operating system commands

OSC 9999 Agent Status

Report a coding agent's state to Orca, which shows it on a dashboard of every agent it runs.

OSC 9999 ; JSON ST
ECMA-48
§8.3.89 OSC – Operating System Command, p. 51
Specification
agent-status-osc.ts, Orca source

OSC 9999 is Orca’s. Orca, by Stably AI, is not a terminal but a desktop app for running many coding agents side by side, each in a terminal pane built on xterm.js, and an agent uses this sequence to tell it what state it is in. Orca shows that on its dashboard, putting a blocked agent among those that need the user.

The body is one JSON object. Its state must be working, blocked, waiting or done, or the whole report is rejected. Optional fields add the kind of agent, the prompt it was given, the model, the tool it is using and that tool’s input, the question it is waiting on, and its last message, each cut to a length Orca sets; interrupted and sessionBoundary go with done. Orca reads the sequence out of every pane’s output before the terminal sees it, and nothing is sent back (agent-status-osc.ts, agent-status-types.ts).

Orca has not documented it: an issue asking for documentation is open, a pull request that would have added it was closed unmerged, and that draft called the format an internal contract, not a public interface. This page describes the source at Orca 1.4.219. The Program Status Protocol proposal names it as earlier work on the same idea.

A default xterm has no OSC 9999 and ignores it (the OSC numbers it knows). The cases follow xterm.

libghostty-vt does not recognize OSC 9999 either: its OSC parser in osc.zig has no state for the number, so the string is dropped, and the cases pass.

Support

TerminalVersionSupportNotes
VT220manual, 2nd ed., 1984NoOSC is not among the controls it recognizes (§4.2)
VT510manual, 1st ed., 1993Noignores an OSC string (chapter 4)
xtermpatch 412, xterm-411aNoignored
libghostty-vt83edd49Noignored
Konsole26.11.70, a24c3d71Nonot among the OSC numbers it handles (Vt102Emulation.h)
ConEmubuild 230724, its documentationNonot in its ANSI escape codes
Orca1.4.219, sourceYesread from each pane’s output; nothing is sent back (agent-status-osc.ts)

Validation

OSC9999-1: Nothing on screen

A
\e]9999;{"state":"working","agentType":"example"}\a
B
|AB____|
cursor 1,3
reply none
Every example on these pages runs in your browser, in libghostty-vt compiled to WebAssembly.