Skip to main content
Interactive terminal running Claude Code in the side panel

What’s running

Browser (xterm.js)  ←WS→  Computer Use Server  ←WS→  Sandbox (ttyd:7681)
                          (proxy on :8081)              (tmux + bash)
  • ttyd — WebSocket terminal server inside the sandbox (port 7681)
  • tmux — persistent session; survives disconnects, scroll history preserved
  • Computer Use Server — transparent WebSocket proxy
  • xterm.js — renders in the browser

Lifecycle

  1. Model calls sub_agent → sandbox created if it doesn’t exist.
  2. Filter injects a preview link → side panel opens.
  3. User sees the dashboard: running Claude Code processes, saved sessions.
  4. Click Open terminal → ttyd starts, Claude Code launches.
  5. tmux keeps the session alive — disconnect and reconnect freely.
  6. Container stays up while the WebSocket is connected (keep-alive heartbeat).
  7. Container auto-stops after CONTAINER_MAX_AGE_HOURS of idleness.

Endpoints (self-hosted)

EndpointPurpose
GET /terminal/{chat_id}/statusIs ttyd running?
POST /terminal/{chat_id}/start-ttydLazy-start on first click
WS /terminal/{chat_id}/wsTerminal WebSocket
GET /terminal/{chat_id}/sessionsList Claude Code JSONL sessions
GET /terminal/{chat_id}/processesList running Claude Code PIDs
POST /terminal/{chat_id}/processes/{pid}/killKill a stuck process

Dangerous mode

Toggle Skip permission prompts to run Claude Code without confirmation dialogs. Sets CLAUDE_AUTOSTARTED=1. Use only for trusted tasks.

The escape hatch

You can leave Open WebUI entirely:
  • Open the server URL in a new tab.
  • Navigate to /terminal/{chat_id}/ for a full-screen terminal.
  • Work with files, run code, use Claude Code — independent of the chat UI.