Skip to main content

How It Works

Every sandbox runs tmux as an invisible session manager. Terminal sessions persist across disconnects — running processes, scroll history, and working directory survive browser refreshes, SSH reconnects, and IDE restarts. Three named sessions are created automatically:
SessionCreated ByAttaches When
vscodecode-server settingsOpening a terminal in the browser IDE
termttyd (browser terminal)Opening /_term/ in the browser
ssh.bashrc auto-attachConnecting via SSH (VS Code Remote, Cursor, direct SSH)
Each session is independent. Work in the browser IDE terminal does not appear in the SSH session, and vice versa.

Session Persistence

tmux sessions persist as long as the container is running.
EventSessions Preserved
Browser tab closed and reopenedYes
SSH disconnect and reconnectYes
IDE restartYes
Workload container restartNo
Suspend and resumeNo
Files, git repos, and installed tools persist across suspend/resume because /root is backed by a volumeset. Only tmux sessions (running processes, shell history in memory) are lost.

Working with tmux

The sandbox tmux configuration hides the status bar and unbinds the prefix key, so it stays invisible. You can still use tmux commands directly:
# List all sessions
tmux ls

# Attach to a specific session
tmux attach -t vscode

# Create a new named session
tmux new-session -s my-session

# Kill a session
tmux kill-session -t my-session
To enable standard tmux key bindings, add a prefix to /root/.tmux.conf:
echo "set -g prefix C-a" >> /root/.tmux.conf
tmux source-file /root/.tmux.conf
This persists across container restarts.

Troubleshooting

This is expected. tmux preserves the scrollback buffer. Scroll down or press Enter to get to the current prompt.
tmux keeps processes alive when you disconnect. To stop a process, reattach and terminate it, or kill the session: tmux kill-session -t term.
Check browser permissions for the sandbox URL. The tmux config enables OSC 52 clipboard support.
The sandbox tmux config sets escape-time to 0. Verify: tmux show-option -g escape-time. Reset if needed: tmux set -g escape-time 0.