Terminal View

For tmux-backed sessions the dashboard renders the agent’s pane as a live terminal in the page, plus an optional paired shell. This page covers both terminals, how they are streamed, reconnect behavior, and the close codes you may see when a connection fails. For the structured-view rendering used by ACP sessions, see the Structured view overview.

The agent terminal rendered in the browser

Agent terminal

The agent pane is streamed the same way on desktop and on a phone. The server renders the pane and pushes its rows over a WebSocket; the dashboard draws them as real text, so scrolling, selection and zoom are the browser’s own. There is no xterm.js and no PTY attach.

Where it can, the server renders from the VT live transport: the pane’s output streams through tmux pipe-pane into an in-process terminal grid, a frame is published the moment the grid changes, and on tmux 3.8 or newer keystrokes travel back over the same socket (older tmux keeps send-keys). Full-screen agents that bracket each repaint in synchronized output (Claude Code’s fullscreen renderer, for example) are published only between brackets, so the page never paints a half-drawn screen. Only rows that changed are sent after the first frame. When the transport is unavailable (tmux older than 3.4, [tmux] vt_live = false, a split window, or a pane whose grid could not be seeded), the server falls back to tmux capture-pane snapshots on a 50 ms cadence (paired shells capture on pane output instead when their observer is armed) and delivers input with tmux send-keys. The fallback cannot withhold a half-drawn repaint. Add ?livedebug=1 to the URL to see which transport a session is using.

Scrolling up into history widens the window the server sends and surfaces a Back to live button; scrolling back to the bottom (or clicking it) returns to the live tail. The agent keeps running while you read.

Settings > Terminal > Font family picks the terminal font. Geist Mono (the default) and JetBrains Mono (Ghostty’s default) ship with the dashboard; common monospace fonts such as Menlo, Fira Code, or a Nerd Font are listed when the device has them installed. The choice follows you to other browsers, and a device without that font renders Geist Mono and says so in the picker.

Copy and scroll

The terminal uses tmux for scrollback and selection, so copy and scroll work with no modifier keys:

  • Scroll with the mouse wheel (or a one-finger swipe on touch) through tmux scrollback. Touch scrolling follows the finger like any native list: drag down to look back through history, drag up to head back toward the live tail.
  • Select by click-dragging across the text. Dragging upward past the top edge scrolls into scrollback and extends the selection. Releasing the drag copies to your system clipboard automatically; no Ctrl/Cmd+C needed.

While a selection touches the terminal the pane stops repainting, so the agent cannot rewrite the text under it mid-gesture. Dragging upward still reaches older scrollback: newly captured history loads in above the held rows. The agent keeps running; the Back to live button appears for as long as the view is held, and clearing the selection (or clicking that button) catches it back up. A full-screen mouse agent also gives up its grip on touch gestures while a selection is live, so the selection handles can be dragged.

Mouse-enabled full-screen agents copy through OSC 52 instead: AoE forwards the agent’s clipboard event through the live connection to the same browser clipboard path.

Copy relies on the browser Clipboard API, which only works in a secure context: HTTPS (the remote-access tunnel modes) or http://localhost. On a plain-HTTP LAN/VPN origin the browser blocks clipboard writes, so the selection stays visible but is not copied. Firefox is best-effort (it lacks the async clipboard write); Chromium and Safari copy reliably.

Agent capture, cursor modes, TTY identity and input stay pinned to the agent pane. Focusing or zooming a secondary tmux pane does not retarget them.

Paired terminal

Each session can open a paired terminal: a host shell (or, for a sandboxed session, one inside the container) rooted at the session’s working directory. On desktop it opens as a tab in the right dock, stacked below Diff and the other review panes, so hiding the review panel hides it too; drag a tab to the bottom dock to keep it below the agent instead. On a phone, pick Terminal from the header’s ⋯. It stays alive in the background when you switch away. Its terminal 1 is the same shell the TUI opens with T, in the matching Host or Container mode.

A terminal tab belongs to the shell it opened, labelled with its session and number (api · 2). Selecting another session changes the main pane but leaves the terminal tabs showing their own shells, so you can keep shells from several sessions open side by side. Cmd+` / Ctrl+` focuses the selected session’s tab if it has one, else opens one; the top-bar terminal icon opens or closes the selected session’s tabs and leaves the others. The + on a dock’s tab strip starts another shell for the selected session; closing a tab other than terminal 1 ends its shell. A tab closes when its session is deleted.

The ⌄ beside it, or Cmd+Shift+` / Ctrl+Shift+`, lists every live paired shell across sessions, grouped by session. Pick one to focus its tab, or open a tab for it. On a phone, ⋯ › More panes… lists the same shells under Paired terminals.

On a writable server, opening or reconnecting either paired shell is refused while the session is held by a lifecycle operation such as purge. A live shell is preserved. Host recovery uses the current project directory; container recovery keeps its pinned working directory and reuses minted values while the container remains running.

For a sandboxed session, a Host / Container control on the dock’s tab strip (or the bar above the shell on a phone) switches the shown tab between the two shells, and the tab is marked host or ctr. Container launches the container user’s preferred shell, resolved inside the container (passwd entry, then $SHELL, then bash, sh). Candidates must be regular executable files and either have a recognized shell name or be listed exactly in /etc/shells. Known-compatible shells run in login mode; other authorized shells run plain. Minimal images without getent read /etc/passwd directly.

Reconnect

If the WebSocket drops (network blip, tunnel re-auth, daemon restart), the terminal reconnects on a fast-start retry ladder (200ms, 400ms, 800ms, 1.5s, 3s, 6s, 10s) so transient warm-up failures recover in well under five seconds. A Reconnecting… banner shows only once a drop outlasts two seconds, so a phone resuming from the background redials quietly, and not while the dashboard’s Daemon unreachable banner already says so. Once the ladder is spent, Connection lost offers Retry; an exited agent shows Agent exited with Restart instead of looping.

Terminal WebSocket close codes

When the browser fails to reach a working terminal, the disconnect banner shows the close code returned by the server:

Code Reason string Meaning Client behavior
1001 server shutdown Daemon is shutting down (SIGINT/SIGTERM). Retry with normal backoff.
1013 tmux_not_ready Pane did not become capturable within 2s. Usually a benign warm-up on first session open. Retry with normal backoff.
4001 pty_dead The live view was running but the pane permanently exited. Show “Click retry” banner.

Read-only mode

With aoe serve --read-only, existing agent and paired terminals keep streaming output. The dashboard does not create or restart panes, claim ownership, renew ownership heartbeats, resize panes, or send keyboard, paste, or mouse input. Delete and triage actions are hidden too.

Compose drafts remain editable, but Send is disabled. Unsent input and unfinished clipboard gestures do not replay when writing becomes available again. An upload or terminal creation accepted before the policy changed remains accepted.

On mobile

The phone renders the same live view, tuned for touch:

  • Scrolling is the browser’s own scroll: momentum, rubber-banding, and finger-true tracking, over the pane’s real scrollback. For a full-screen agent, whose scrollback lives inside the app, a drag is forwarded to the app as wheel input instead, one line at a time and paced to the app’s redraws.
  • Text selection is native: long-press to select and copy, like any web page.
  • Typing goes back over the same WebSocket. Tapping the terminal opens the soft keyboard, except in a full-screen app with mouse support, where a tap is a click; the typing bar above the key row, Message <Session>, opens it either way, and shows a button to close it while it is up. While the keyboard is up, the bar shows the line typed so far, except at a password prompt, where it shows that typing is hidden and keeps nothing typed. It recognises common prompts (sudo, ssh and its key passphrases, git over HTTPS, curl, OpenSSL, passwd, su, gpg, verification codes), also when one wraps onto a second row; a prompt it doesn’t recognise isn’t hidden, and keys typed before the prompt reaches the phone can show briefly until it does. While the Agent waits for you, the bar reads Reply to <Session> with an amber outline; it never opens the keyboard by itself. Beside the bar, a Compose button opens a text box for dictation, autocorrect, and long-press paste, and sends the text as one paste; it is hidden at a password prompt. The key row adds Esc, Tab, a Ctrl toggle, and paste by default, and ends with Enter while the soft keyboard is closed if the row has room; pick and order its keys under Settings > Terminal, where Key bar can also hide the row while the keyboard is closed, in every browser. With a hardware keyboard the soft keyboard never opens, so the row shows while the terminal has focus. A row with its own Compose key leaves the bar’s out; that key is disabled at a password prompt. Toolbar key sequences consume the one-shot Ctrl modifier, including Enter, Ctrl+C, and held repeats. Drag the joystick for arrow keys. Long-press it, then drag, to move it to the other side or another height; it remembers the spot on this device. Opening the keyboard never resizes the agent’s pane. In an agent terminal with the soft keyboard up, Enter sends the line and puts the keyboard away; Shift+Enter does not, and a hardware keyboard keeps focus. A paired terminal keeps the keyboard up after Enter until you close it.
  • Pinch adjusts the font size; the pane is resized to the resulting grid once, when the gesture ends.

A “Back to live” pill appears while you are scrolled up; tapping it (or scrolling to the bottom) returns to the live tail. The pane stays mounted while you switch views so the connection and scroll position survive.

Add ?livedebug=1 to the dashboard URL to overlay frame rate, arrival-to-paint latency, and the share of updates that arrived as row patches.