@johnnywu/pi-terminal-signals

Pi extension that communicates agent lifecycle to the terminal via OSC 9;4 (progress) and OSC 133 (semantic prompts).

Package details

extension

Install @johnnywu/pi-terminal-signals from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:@johnnywu/pi-terminal-signals
Package
@johnnywu/pi-terminal-signals
Version
0.1.1
Published
May 5, 2026
Downloads
not available
Author
johnnywu
License
MIT
Types
extension
Size
6.2 KB
Dependencies
0 dependencies · 1 peer
Pi manifest JSON
{
  "extensions": [
    "./index.ts"
  ]
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

README

pi-terminal-signals

Let's pi send standard OSC escape sequences to inform the terminal it is running in of its status.

Ghostty will display a progress line at the top while pi is running the agent loop. Supacode, Supaterm and Conductor use it to display a spinner / finished icon on the worktree / agent tab.

Demo

https://github.com/user-attachments/assets/911ac2fb-f505-4a66-8593-b12afdcb710a

Unmute for audio.

Install

pi install npm:@jwu/pi-terminal-signals

What it does

Pi event Escape sequence Terminal effect
agent_start OSC 9;4;3 Tab shows indeterminate progress spinner
agent_end OSC 9;4;0 Progress indicator clears
agent_end OSC 133;D;0 "Command finished" — triggers completion notification

OSC 9;4 — Progress indicator protocol (originated in ConEmu, adopted by Ghostty, WezTerm, Windows Terminal). State 3 is indeterminate (spinner), state 0 clears.

OSC 133 — Semantic prompt protocol (originated in FinalTerm, adopted by Ghostty, iTerm2, Kitty, WezTerm, VS Code terminal). Marker D;0 means "command finished successfully" — Ghostty uses this to fire a tab completion notification.