Sessions
Sessions provide persistent terminal environments within your devbox that survive browser tab closures, network disconnections, and even devbox pause/resume cycles.
What are Sessions?
A Session is a named, persistent terminal environment. Unlike regular terminal connections that are ephemeral and lost when you close your browser tab or disconnect, Sessions preserve your terminal state and allow you to:
- Detach and reattach: Close your browser and reconnect later to find your terminal exactly as you left it
- Survive restarts: Sessions with associated commands automatically restart when your devbox resumes from a paused state
- Run persistent processes: Keep long-running processes (servers, watchers, builds) running even when disconnected
Sessions vs. Regular Terminals
| Feature | Session | Regular Terminal (SSH/Tab) |
|---|---|---|
| Persists after disconnect | Yes | No |
| State preserved on browser close | Yes | No |
| Survives devbox pause/resume | Yes (with auto-restart) | N/A |
| Named and manageable | Yes | No |
| Visible in dashboard sidebar | Yes | No |
Creating Sessions
From the Dashboard
- Navigate to your devbox in the Namespace dashboard
- In the left sidebar, click New session under the Sessions section
- A new session is created with a randomly generated name and you're automatically connected
With Commands
Sessions can be created with an associated command that runs when the session starts. This is useful for:
- Starting development servers
- Running file watchers
- Launching interactive REPLs
- Any persistent process you want to keep running
When a devbox resumes from a paused state, sessions with associated commands are automatically restarted with their configured command.
Managing Sessions
Viewing Sessions
All active sessions are displayed in the left sidebar of the devbox dashboard. Each session shows:
- Name: The session identifier (can include emojis)
- Status: Whether the session is attached or detached
Connecting to a Session
Click on any session in the sidebar to connect to it. Connecting to a session takes exclusive control, so if another browser tab was connected to that session, it will be detached.
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.
Session Behavior
Persistence Across Pause/Resume
When your devbox is paused:
- Session metadata is preserved
- Running processes are stopped
When your devbox resumes:
- Sessions with associated commands are automatically restarted
- The command runs again, restoring your development environment
- Sessions without commands remain available but empty
Session Naming
Sessions are created with randomly generated names by default. Names can include emojis for easier identification in the sidebar.
Use Cases
Development Servers
Create a session with your dev server command. Even if you close your browser, the server keeps running. When you reconnect, you can see all the logs and interact with the running process.
Multiple Workstreams
Create separate sessions for different tasks:
- One session for your dev server
- Another for running tests
- A third for git operations and general shell work
Switch between them instantly without losing context.
Long-Running Tasks
Start a build, test suite, or data processing job in a session. Disconnect and come back later to check the results without interrupting the process.
Technical Details
Sessions provide:
- Full terminal emulation
- Scroll-back buffer preservation
- Session persistence independent of connection state
Session state is stored in the devbox's persistent storage and survives devbox restarts.
Next Steps
Core Concepts → Learn about base images, blueprints, and lifecycle management.
Introduction → Get started with creating your first devbox and connecting your development tools.
SSH & Remote Access → Learn about other ways to connect to your devbox.