> ## Documentation Index
> Fetch the complete documentation index at: https://docs.opencomputer.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Workspaces

> Prepared repo environments, rebuilt on push

<Note>**Labs preview.** Workspaces are not part of the stable Durable Sessions API. A session can already work in its [sandbox](/agent-sessions/runtime-tools); private repos are checked out before the first turn through [Repos & GitHub](/agent-sessions/repos).</Note>

A **workspace** runs clone, install, and build steps ahead of time, then snapshots the result. Sessions can start from the latest successful workspace build instead of rebuilding from scratch.

```bash theme={null}
oc workspace create web \
  --repo github.com/acme/web \
  --setup "pnpm i && pnpm build" \
  --pool 1
```

* **Recipe.** One or more repos (each at an optional ref), a `setup` step, and an optional `warm` step to heat caches.
* **Builds.** Rebuilt on every push (or on an interval) into an immutable lineage; a session starts from the latest successful build and pins it. `--pool N` keeps machines pre-booted.
* **Resolution.** A session is not bound to a repo — it resolves which to work in from the triggering event, the conversation, an agent default, or by asking. Resolution is lazy and re-resolvable: switch repos mid-session, or open several at once.

Pairs with the scoped, tokenless private-repo access noted in [Runtime tools](/agent-sessions/runtime-tools).
