---
name: forgehand-workspaces
description: Create and use Forgehand workspaces, choose environment images, and manage persistent files and packages.
---

# Forgehand workspaces

A workspace is a persistent `/workspace` directory and an environment image. Multiple sessions can mount the same workspace at once. First identify the intended team when names repeat across teams.

## Create and find

- CLI: `fh workspaces` lists accessible workspaces. `fh workspace create <team-slug> <name> [--image IMAGE]` creates one. A new workspace may show **preparing** until storage is ready.
- Web: open **Workspaces → New workspace**, choose a team, name, and optional image. Open the workspace to check readiness and sessions.
- CLI workspace references accept a name, `team-slug/name`, or an unambiguous ID prefix. Use the qualified name when a plain name is ambiguous.

## Environment and files

The web workspace's **Environment** form changes the image for *future* sessions. Choose a public `linux/amd64` image. Forgehand adds SSH and JupyterLab and does not run the image's own entrypoint or command. The CLI can set an image at creation but does not currently edit it afterward.

Inside a session:

- `/workspace` persists across session stops and is shared by all sessions of this workspace. Home is `/workspace/.home`.
- `/team` persists and is shared across the team's workspaces.
- `/scratch` is fast local storage and is lost when that session stops. Copy important output to `/workspace` or `/team` first.

Keep code and workspace-specific checkpoints in `/workspace`; keep datasets and checkpoints shared across workspaces in `/team`. For training with many small files or random reads, stage the working set on `/scratch` when it fits: `/workspace` and `/team` are network storage.

Sessions on the same workspace see each other's files immediately. Give concurrent jobs separate output paths so they do not write the same checkpoint file at once.

Python packages installed into the session environment are recorded in `/workspace/.forgehand/requirements.txt` and restored on future starts. Added apt packages are recorded in `/workspace/.forgehand/apt-packages.txt`. For other startup work, use an executable `/workspace/setup.sh`; inspect `/workspace/.forgehand/setup.log` when setup is still running or fails. A session may reach **running** while background package restoration continues.
