Thread preview
The desktop agent can serve a Bun dev server from any project and embed it inside the thread. Skill: images/opencode/seed/skills/preview, CLI: ob-preview.
Usage
ob-preview up --session SESSION DIR # serve a directory (auto-detect entry)
ob-preview up --session SESSION --entry FILE
ob-preview status --session SESSION
ob-preview down --session SESSIONThe agent includes one reply marker to embed it:
How it reaches the browser
ob-previewbinds a port in the allowlist 4700–4719 and registers it under~/.open-bot.- The control plane proxies that port through a capability-token frame URL:
/api/preview/frame/<token>/. - On a wide screen the dashboard lifts the iframe into a resizable pane beside the thread; on a narrow screen it covers the viewport.
| Limit | Value |
|---|---|
| Port range | 4700–4719 (PREVIEW_PORT_MIN/MAX) |
| Preview TTL | 10 minutes |
| Inline HTML cap | 2,000,000 bytes |
The preview frame renders desktop-served HTML in the dashboard origin proxy. It is capability-token scoped, but only serve content you trust.