Creating Workspaces
Workspaces are ephemeral AI coding environments — a VM, a devcontainer, and your repo, accessible through a browser terminal.
Before You Start
Section titled “Before You Start”You need:
- A SAM account (sign in with GitHub)
- A Hetzner API token added in Settings
- The GitHub App installed on at least one repository
Creating a Workspace
Section titled “Creating a Workspace”From the Dashboard
Section titled “From the Dashboard”- Navigate to the Dashboard
- Click New Workspace (or use the project’s workspace creation)
- Select:
- Repository — from repos with the GitHub App installed
- VM Size — Small, Medium, or Large
- Branch (optional) — defaults to the repo’s default branch
- Click Create
What Happens Next
Section titled “What Happens Next”- SAM selects an existing healthy node or provisions a new Hetzner VM
- The VM runs cloud-init: installs Docker, downloads the VM Agent, starts the agent service
- The VM Agent creates a Docker container with your repo’s devcontainer configuration
- Your repository is cloned into the container
- The workspace becomes accessible at
ws-{id}.yourdomain.com
Provisioning takes 2-5 minutes for new nodes, or seconds if reusing a warm node.
Using a Workspace
Section titled “Using a Workspace”Terminal
Section titled “Terminal”Click a running workspace to open the browser-based terminal. This is a full PTY session via xterm.js and WebSocket — it behaves like a real terminal.
Features:
- Session persistence — terminal sessions survive page refreshes
- Multiple tabs — shell terminals and agent chat sessions
- Copy/paste — standard keyboard shortcuts work
- Resize — terminal auto-resizes with the browser window
Agent Chat
Section titled “Agent Chat”Click + New Chat to start a Claude Code session. Type a prompt and Claude will:
- Read and modify code in your repository
- Run commands in the terminal
- Stream responses in real-time
Each chat session runs in its own tab alongside shell terminals.
Managing Workspaces
Section titled “Managing Workspaces”Stopping
Section titled “Stopping”Click Stop on a running workspace. This:
- Powers off the VM (if no other workspaces are using it)
- Preserves the workspace record for restart
Stopped workspaces don’t incur Hetzner charges.
Restarting
Section titled “Restarting”Click Restart on a stopped workspace. SAM provisions a new VM and recreates the container. Your repository is re-cloned from GitHub.
Deleting
Section titled “Deleting”Click Delete to permanently remove a workspace. This cleans up:
- The Docker container
- DNS records
- The VM (if no other workspaces are using it)
Task-Based Workspaces
Section titled “Task-Based Workspaces”You can also create workspaces implicitly through tasks:
- Go to a project’s chat view
- Submit a task description
- SAM automatically provisions a workspace, runs Claude Code with your task, and creates a PR
After the task completes, the node enters a warm pool for 30 minutes, enabling fast reuse for subsequent tasks.
VM Sizes
Section titled “VM Sizes”| Size | Specs | Best For | Hourly Cost |
|---|---|---|---|
| Small | 2 vCPU, 4GB RAM | Simple tasks, code review | ~$0.007 |
| Medium | 4 vCPU, 8GB RAM | Most development work | ~$0.012 |
| Large | 8 vCPU, 16GB RAM | Large builds, heavy compilation | ~$0.030 |