Your VM runs a signed-in opencode that fixes a failing test in your repository. The diff of that fix appears in your terminal.
Before you start
Section titled “Before you start”- An account on the dashboard. New accounts need approval first; the dashboard shows your status.
- An opencode login or a provider key for the model it uses. Model usage follows your provider’s terms and billing.
- A repository with a failing test that you can clone. A public repository needs nothing else. For a private one, follow Open pull requests first.
sifor the CLI tab. Install it as shown in From your terminal.
1. Create a VM with opencode
Section titled “1. Create a VM with opencode”Every VM has opencode installed, so you install nothing. The VM image takes opencode from its GitHub release.
- Open SVMs.
- Select Create SVM.
- Enter a name, such as
opencode-example, and keep the other fields. - Select Create SVM.
- Select Open terminal on the new row.
VM=opencode-examplesi create --name "$VM"2. Sign in to opencode
Section titled “2. Sign in to opencode”-
In the terminal, run:
Terminal window opencode -
Enter
/connect, choose your provider, such as OpenCode Go, and finish its sign-in. OpenCode Go shows a device code to approve in your browser. -
Quit opencode.
si shell "$VM"In the shell, run opencode, type /connect, choose your provider and finish its sign-in. Quit opencode, then run exit.
Your SlashInfra sign-in does not sign opencode in to its model provider. opencode keeps its own login inside the VM.
3. Clone your repository
Section titled “3. Clone your repository”-
In the terminal, run:
Terminal window git clone https://github.com/your-org/your-repo.git /home/user/app
si exec "$VM" -- git clone https://github.com/your-org/your-repo.git /home/user/appUse an HTTPS URL. Git over SSH does not receive the GitHub credential.
4. Ask for the fix
Section titled “4. Ask for the fix”- Open Companion.
- Choose OpenCode as the agent.
- Choose your VM in the SVM menu.
- Choose Other folder, and enter
~/app. - Enter
Run the tests, fix the failing test and explain the change.in Task. - Select Start agent. The agent may ask for permission while it works. Answer in Companion.
si agent run "$VM" --agent opencode --cwd /home/user/app -- 'Run the tests, fix the failing test and explain the change.'The agent runs with full access inside the VM: it edits files and runs commands without asking. The output streams to your terminal, and the command ends with the agent’s exit code. If it reports an error, follow its message.
5. Review the diff
Section titled “5. Review the diff”-
In the terminal, run:
Terminal window cd /home/user/app && git diffOutput diff --git a/<path> b/<path>...
si exec "$VM" -- git -C /home/user/app diffdiff --git a/<path> b/<path>...The diff should change the code under test and leave the test file as it was.
Check it works
Section titled “Check it works”You should now see the diff of the fix in your terminal. Run your project’s test command in the terminal. The test that failed passes.
If it doesn’t work
Section titled “If it doesn’t work”| Symptom | Cause | Fix |
|---|---|---|
Repository not found on clone |
The repository is private and not connected, or the URL uses SSH. | Use an https://github.com/ URL. For a private repository, follow Open pull requests. |
| The agent prints a sign-in error | opencode is not signed in, so the command exits with an error. | Run opencode in the shell, type /connect and finish the sign-in. |
| The test still fails | The agent stopped early or changed another file. | Read the output, then ask again with the error text. |
Scroll horizontally to see all columns.
Clean up
Section titled “Clean up”- Open SVMs.
- Select Delete on the row of the VM.
si rm "$VM"- Open pull requests: push the fix from the VM and open a pull request.
- One VM per task: run each task in its own VM, on its own branch.
- Agent sessions: list, resume and delete the sessions this guide starts.