VS Code remote access requires SSH access, which is only available with the Daytona sandbox provider.
Prerequisites
- VS Code with the Remote - SSH extension installed
- A running Daytona sandbox with SSH access enabled
Connecting to a sandbox
-
Start a workflow with SSH access and a preserved sandbox:
-
Fabro prints the SSH connection command:
-
In VS Code, open the Command Palette (
Cmd+Shift+P/Ctrl+Shift+P) and run Remote-SSH: Connect to Host… -
Paste the hostname from the SSH command (e.g.
daytona@fabro-20260307-143022-a3f2.ssh.daytona.io) -
Once connected, open the workspace folder at
/home/daytona/workspace
What you can do
Once connected, VS Code operates as if the sandbox filesystem were local:- Edit files — Full IntelliSense, code navigation, and refactoring on the sandbox filesystem
- Terminal — Open integrated terminals that run directly on the sandbox
- Debug — Attach debuggers to processes running in the sandbox using standard launch configurations
- Port forwarding — Access web servers and other services running in the sandbox from your local browser
- Extensions — VS Code extensions install on the sandbox automatically, so linters, formatters, and language servers work as expected
Tips
- Use
--preserve-sandbox— Without it, the sandbox is destroyed when the workflow finishes and your VS Code session disconnects. Combine withauto_stop_intervalin your run config to control idle timeout. - Pair with human gates — When a workflow pauses at a human gate, connect via VS Code to review the agent’s changes before approving.
- SSH credential lifetime — Daytona SSH credentials expire after 60 minutes. If your VS Code session disconnects, you’ll need to start a new run with
--sshto get fresh credentials.