Skip to main content
Sessions provide persistent terminal environments within your Devbox that survive browser tab closures and network disconnections.

What are Sessions?

A Session is a named, persistent terminal environment that preserves your terminal state. Sessions allow you to:
  • Detach and reattach: Disconnect and reconnect later — from the dashboard or the CLI — to find your terminal exactly as you left it
  • Run persistent processes: Keep long-running processes (servers, watchers, builds) running while disconnected
  • Access anywhere: Connect to sessions from the web dashboard or your local terminal with the Devbox CLI

Sessions vs. Regular Terminals

Creating Sessions

From the Dashboard

  1. Navigate to your Devbox in the Namespace dashboard
  2. In the left sidebar, click New session under the Sessions section
  3. A new session is created with a randomly generated name and you’re automatically connected

From a Spec File

Sessions can also be defined in a spec file so they are created automatically when the Devbox starts.

Managing Sessions

Viewing Sessions

All active sessions are displayed in the left sidebar of the Devbox dashboard.

Connecting to a Session

From the Dashboard: Click on any session in the sidebar to connect to it. Connecting to a session takes exclusive control — if another browser tab was connected to that session, it will be detached. From the CLI: Connect to a named session from your local terminal:
If you omit the Devbox name, an interactive picker is shown:
The CLI connection takes exclusive control of the session, just like the dashboard. If the Devbox is paused, it is automatically resumed before connecting.

Deleting Sessions

Hover over a session in the sidebar and click the close button to delete it. This terminates any running processes in that session.

Use Cases

Development Servers

Run your dev server in a session. The server keeps running when you close your browser, and all logs are available when you reconnect.

Multiple Workstreams

Create separate sessions for different tasks: a dev server, test runner, and general shell. Switch between them instantly without losing context.

Long-Running Tasks

Start a build or test suite in a session, then disconnect and check the results later. For non-interactive runs you don’t need to attach to, devbox exec -d starts a command detached and devbox logs collects its output.

Next Steps

Remote Development → Connect to your Devbox via SSH, VS Code, Cursor, Zed, or JetBrains. Managing Devboxes → Lifecycle operations, machine sizes, workspace defaults, and monitoring. Executing Commands → Run commands in a Devbox with devbox exec and read their output with devbox logs. Custom Images → Build custom base images with your tools and runtimes pre-installed.
Last modified on August 19, 2026