Skip to Content
The StudioTerminal & Devbox

Terminal & Devbox

The Studio includes a multi-tab terminal connected to a Devbox — a gVisor-sandboxed Linux environment running in the cloud. Every terminal session is a real shell with full access to your repository files.

Devbox

Each repository opened in Studio gets its own Devbox instance. The Devbox is a lightweight container sandbox that provides:

  • A full Linux userspace (Ubuntu-based)
  • The repository cloned at /workspace
  • Standard dev tools: git, node, npm, python, pip, go, cargo, etc.
  • Network access for installing packages and running services
  • Persistent state across tab switches — your session survives browser reloads

Connection lifecycle

POST /projects/:id/devbox → spawn session GET /devbox/sessions/:id → poll until phase=ready POST /devbox/sessions/:id/ticket → mint WebSocket ticket WS /devbox/sessions/:id/terminal → xterm.js connection

The terminal auto-reconnects with exponential backoff if the WebSocket connection drops. A status indicator in the terminal header shows the connection state:

StatusMeaning
ConnectedTerminal is live and accepting input
ReconnectingWebSocket dropped — attempting to reconnect (up to 6 retries)
ErrorConnection failed — click Reconnect to retry
TerminatedSession ended (e.g. idle timeout)

Multi-tab terminal

The terminal panel supports up to 5 tabs, each with its own independent Devbox shell session.

ActionHow
New tabClick the + button
Close tabClick the × on the tab
Rename tabDouble-click the tab label and type a new name
Switch tabsClick any tab

Split view

Click the split button (⊞) in the terminal header to show two terminals side by side. Each split side has its own tab bar — you can run different commands simultaneously and compare output.

Terminal features

The terminal is powered by xterm.js  and supports:

  • Full ANSI color — syntax-highlighted output, colored prompts, etc.
  • Auto-resize — the terminal resizes to fit the panel. Resize events are sent to the Devbox ({type:'resize', cols, rows}).
  • Copy / paste — standard terminal selection and paste shortcuts
  • Scrollback — scroll up to view previous output
  • Cendra integration — type natural language and Cendra can interpret it as a command suggestion

Error detection & auto-fix

The terminal automatically monitors output for common error patterns and surfaces them as an actionable banner — no need to scroll through logs to find failures.

How it works

  1. Terminal output is continuously scanned via WebSocket frame parsing
  2. When an error pattern is detected, an error banner slides in above the terminal
  3. The banner shows: ⚠ warning icon, truncated error text (up to 200 characters), a Fix with Cendra button, and a × dismiss button
  4. Detection is debounced to avoid flashing on multi-line errors

Detected error patterns

The following patterns are detected automatically:

PatternExamples
JavaScript errorsTypeError:, ReferenceError:, SyntaxError:, Error:
Python errorsTraceback (most recent call last), ModuleNotFoundError:
Build errorsnpm ERR!, failed to compile, Build failed, cargo error
System errorsPermission denied, command not found, ENOENT:, EACCES:
Process errorsFATAL, panic:, exit status [1-9], make: ***
Module errorsCannot find module

Fix with Cendra

Click Fix with Cendra in the error banner to:

  1. Dismiss the error banner
  2. Open the Cendra AI panel (if not already open)
  3. Automatically send a /fix prompt to Cendra with the error text
  4. Cendra analyzes the error, explains the cause, and writes a fix

Dismiss

Click × to dismiss the error banner without opening Cendra. The banner is simply removed and no further action is taken.

Minimize and restore

Click the button in the terminal header to minimize the terminal panel. The terminal collapses but stays connected — your session is preserved.

Restore the terminal by pressing Ctrl+` or clicking the terminal toggle in the toolbar.

Toggle

Press Ctrl+` to toggle the terminal panel open or closed.

Last updated on