---
name: forgehand-sessions
description: Choose Forgehand compute classes, start and stop CPU or GPU sessions, and handle session state or idle stopping.
---

# Forgehand sessions

A session is a billable machine attached to a workspace. Choose a compute class with the needed CPU/GPU capacity and price before starting. A restricted class must be enabled for the team; the web picker labels it and `fh classes` marks its price with `*`. Usage is charged from launch through termination; a stopped workspace keeps persistent files.

## Start, inspect, stop

- CLI: run `fh classes` for available classes and hourly prices, then `fh session start <workspace> --class <slug> --wait`. `--wait` waits for **running**, although environment setup may still be finishing. `fh session ls [<workspace>]` lists live sessions; add `--all` for finished sessions. `--json` gives machine-readable output. Session references are IDs or unambiguous ID prefixes.
- Web: open a workspace, choose a class in **Start a session**, and press **Start**. The session row shows state, owner, class, launch progress, connection details, and accrued cost.
- CLI: `fh session stop <session-id>`. Web: press **Stop** on the session row. Any team member can stop another member's session. Confirm the exact session before stopping, especially where several teammates share a workspace. `/workspace` and `/team` survive; `/scratch` does not.

## State and idle behavior

**Queued** means launch is being prepared or waiting for allowance. **Waiting for capacity** means the selected machine type is temporarily unavailable; the web row shows retries and timing. Inspect the row before retrying, and consider another suitable class if the user wants to change course. Failed or stopped sessions may show a reason in the web Usage history.

The session row shows its idle timeout and has a link to turn idle stopping on or off for that session. An active process, SSH connection, or Jupyter activity prevents an idle stop; a detached training process should still be verified. Run long jobs in `tmux` or `nohup`, save outputs to persistent storage, and stop sessions when finished.
