wire / terminal-osc / 633
OSC 633 marks shell-integration boundaries for VS Code's terminal: prompt start, command start, command executed, and command finished (with exit code and optional duration). It parallels OSC 133 but adds VS Code-specific properties such as the current working directory and an explicit 'E' (command line) marker.
aka: VS Code shell integration · OSC 633 · VSCODE shell integration
OSC introducer: \x1b] ESC ] (0x1B 0x5D)
terminator (ST|BEL): ST \x1b\ · BEL \x07
| id | name | bytes (ST) | meaning |
|---|---|---|---|
| A | Prompt start (A) | \x1b]633;A\x1b\ | OSC 633 ; A ST marks the start of a prompt. |
| B | Command start (B) | \x1b]633;B\x1b\ | OSC 633 ; B ST marks the start of the command line (end of prompt). |
| C | Command executed (C) | \x1b]633;C\x1b\ | OSC 633 ; C ST marks the start of command output (end of command line). |
| D | Command finished (D) | \x1b]633;D;0\x1b\ | OSC 633 ; D [; exitcode] [; duration] ST marks command completion, optionally carrying the exit code and duration in ms. |
| E | Command line (E) | \x1b]633;E;ls -la\x1b\ | OSC 633 ; E ; <commandline> ST reports the command line text to the terminal. |
| P | Property (P) | \x1b]633;P;Cwd=/home/user\x1b\ | OSC 633 ; P ; <key>=<value> ST sets a property such as Cwd (current working directory). |
agent: curl -H 'accept: application/json' wire.phall.io/terminal-osc/633
or /terminal-osc/633.json