# One VM per task

Prepare one VM, snapshot it, fork a VM per issue, run an agent in each and push three branches.

Source: https://slashinfra.com/docs/agents/many-tasks
Last modified: 2026-11-30T16:36:19.000Z

Three issues become three VMs and three branches, all started from one prepared disk.

Figure: One prepared VM becomes a snapshot, and the snapshot becomes one VM for each issue.

## Before you start

- An account on the [dashboard](https://app.slashinfra.com/). New accounts need approval first; the dashboard shows your status. 
- A repository with the issues you want to fix. This guide uses issues `101`, `102` and `103`. 
- A signed-in agent. [Claude Code](https://slashinfra.com/docs/agents/claude-code) and [Codex](https://slashinfra.com/docs/agents/codex) show the sign-in steps. Model usage follows your provider’s terms and billing. 
- `si` installed as shown in [From your terminal](https://slashinfra.com/docs/start/cli). 
- For a private repository, follow [Open pull requests](https://slashinfra.com/docs/agents/pull-requests) first.

## 1. Prepare one VM

Create the VM that every fork starts from, then clone the repository into it.

```bash
VM=issue-base
si create --name "$VM"
si exec "$VM" -- git clone https://github.com/your-org/your-repo.git /home/user/app
si shell "$VM"
```

In the shell, sign in to your agent and install the repository’s dependencies. Run `exit` when you finish.

## 2. Snapshot it

```bash
si snapshot create --name repo-ready "$VM"
```

Output

```text
8m2p1xwq7r
```

The snapshot does not stop the base VM. Check that `si snapshot ls` shows `ready` for `repo-ready` before you fork it.

## 3. Fork one per issue

```bash
for ISSUE in 101 102 103; do
si create --snapshot repo-ready --name "issue-$ISSUE"
done
```

Each command starts a VM on the disk of the snapshot and prints its id. Each fork starts with the same files as the base VM, and its writes stay in its own VM.

## 4. Start an agent in each

### Dashboard

- Open [Companion](https://app.slashinfra.com/companion). 
- Choose Codex as the agent. 
- Choose `issue-101` in the SVM menu. 
- Choose Other folder, and enter `~/app`. 
- Enter `Read GitHub issue 101, fix it and commit the fix on the branch issue-101.` in Task. 
- Select Start agent. Repeat for `issue-102` and `issue-103`.

### CLI

```bash
for ISSUE in 101 102 103; do
si agent run "issue-$ISSUE" --agent codex --cwd /home/user/app -- "Read GitHub issue $ISSUE, fix it and commit the fix on the branch issue-$ISSUE." &
done
wait
```

The three agents run at the same time. `wait` returns when all three end.

## 5. Collect the branches

```bash
for ISSUE in 101 102 103; do
si exec "issue-$ISSUE" -- git -C /home/user/app push origin "issue-$ISSUE"
done
```

Each push sends one branch from its VM to GitHub. Open a pull request for each branch as shown in [Open pull requests](https://slashinfra.com/docs/agents/pull-requests).

## Check it works

You should now see three branches, `issue-101`, `issue-102` and `issue-103`, in your repository on GitHub.

## If it doesn’t work

| Symptom | Cause | Fix |
| --- | --- | --- |   
| `si create` refuses a name | Another VM in your organization has that name. | Choose another name, or remove the old VM with `si rm`. | 
| `si snapshot ls` shows `failed` | The capture failed, so the snapshot cannot start a VM. | Delete it with `si snapshot rm repo-ready`, then create it again. | 
| `Repository not found` on push | The VM cannot reach the private repository. | Follow [Open pull requests](https://slashinfra.com/docs/agents/pull-requests) for each VM that pushes. |

## Clean up

> Caution
> 
> 
> 
> Deletes the VMs and their disks. Pushed branches stay on GitHub. Deletion cannot be undone.

Delete the forks first. A snapshot that a VM uses cannot be deleted.

```bash
for ISSUE in 101 102 103; do
si rm "issue-$ISSUE"
done
si snapshot rm repo-ready
si rm "$VM"
```

## Next

- [Open pull requests](https://slashinfra.com/docs/agents/pull-requests): open a pull request for each branch. 
- [Snapshots and forks](https://slashinfra.com/docs/platform/snapshots): what a snapshot keeps and when it counts toward storage. 
- [Sleep and wake](https://slashinfra.com/docs/how/sleep-and-wake): what each VM keeps while its agent waits for its model.
