Documentation · Start here

Use OH with coding agents

OH bundles the oh-router command and the oh agent skill inside Oh.app so Claude Code, Codex, and Cursor can inspect active sessions, steer prompts safely through the VT screen guard, and coordinate @vercel/board tasks.

OH Agents workspace with project sidebar, Opus Sol Fable Astra picker, effort control, turn diff, and VT guard badge.
The Agents workspace (Cmd+1) pairs structured diffs and a live PTY with the Opus / Sol / Fable / Astra picker and four-step effort control.

1. Install OH and link oh-router

OH requires an Apple Silicon Mac (arm64) running macOS 15.0 or newer. Install Oh.app from oh.computer or Homebrew, then open **Help → Use with Coding Agents…** in the menu bar.

  1. Click **Install oh-router Command (~/.local/bin/oh-router)** inside **Help → Use with Coding Agents…** to symlink ~/.local/bin/oh-router to Oh.app/Contents/Helpers/oh-router. OH links only oh-router and never overwrites any other command in ~/.local/bin.
  2. Click **Install Skill to ~/.agents/skills/oh/** (or run npx skills add hraness/product-skills --skill oh) so local coding agents load SKILL.md.
  3. Optionally run oh-router daemon setup-hooks --write to register Claude Code lifecycle hooks while preserving any existing statusLine command via statusline-bridge --passthrough.
Install OH, skill, and Claude Code hooks
$ brew install --cask hraness/tap/oh
$ npx skills add hraness/product-skills --skill oh
$ oh-router --version
$ oh-router daemon setup-hooks --write

2. Inspect and steer through the 2D VT screen guard

Agents working alongside OH should always read structured JSON output (--json) before steering another session. ohd classifies every session's 2D virtual terminal screen into empty_input_box, busy_streaming, permission_dialog, trust_dialog, limit_dialog, or reset_ready_prompt.

Inspect turns and queue a follow-up prompt
$ oh-router ps --json
$ oh-router inspect term_01 --json
$ oh-router steer term_01 --mode queue "Run cargo test --workspace next"

Credits Protection Gate: whenever a session displays limit_dialog, ohd and Oh.app block raw PTY input and queued prompts so paid extra-usage prompts are never accepted accidentally.

3. Session environment variables

Every process spawned by ohd receives these environment variables automatically:

VariablePurpose
OH_SESSION_IDUnique session identifier (term_...) for the current PTY holder.
OH_PROJECTProject name passed to oh-router spawn --project.
OH_PROFILE_IDWorkspace profile (default, work, etc.) selected for this session.
OH_CONTROL_SOCKETPrivate Unix domain socket (~/.local/state/oh/ohd/ohd.sock, mode 0600).
OH_EVENT_SOCKETHook event socket (~/.local/state/oh/ohd/events.sock, mode 0600).