MANUAL
VS Code setup
Connect judging of Claude Code and Codex in VS Code to SBB.
OVERVIEW
Overview
To connect Claude Code and Codex in VS Code to SBB, use the VS Code extension from Sanary Build Interface (SBI), called “SBI for VS Code Extension”. The extension sets up the Agent hooks and, when an Agent finishes, hands the result to SBB to be judged.
SBB is optional.
If SBB is not running, your Agent still works as usual. The evaluation is then shown as unavailable, and it is never treated as approved.
No setup is needed on the SBB side. Once the extension is installed, it connects and reconnects automatically.
BEFORE YOU START
Before you start
- A Mac with macOS 13 or later on Apple Silicon (arm64). It does not run on Intel Macs, Windows, or Linux.
- VS Code 1.100 or later.
- The CLI of the Agent you use (Claude Code or Codex), installed by you. The extension installs nothing automatically.
- SBB running, if you want SBB to judge.
We will announce how to get the extension when it is released.
STEPS
Steps
- Install the extension (a .vsix file). In VS Code’s Command Palette run
Extensions: Install from VSIX…, or runcode --install-extension <file>.vsixin a terminal. - Open a workspace folder. The extension activates once VS Code has finished starting. It does not run in an untrusted workspace or in a virtual (remote file system) workspace.
- On first activation, the extension checks whether a compatible SBI Runtime is already listening on
127.0.0.1:8788. If so, it reuses it; otherwise it starts its own. If some other service already uses that port, it is never killed or overridden. - In the Command Palette run
SBI: Run Agent(or use@sbi /claude …/@sbi /codex …in Chat), choose an Agent, and enter an instruction. The result appears in the SBI Output Channel and as a notification. - In SBB’s Settings, on the Connections tab, check that “Visual Studio Code” reads Connected.
SBB Settings > Connections, with Visual Studio Code reading Connected
CHECK
Check the connection
- In SBB, Settings > Connections > Visual Studio Code reads Connected (Not Connected means it is not connected; the status refreshes every 2 seconds).
- Give an Agent a short task, and SBB’s decision notification appears when it finishes.
If you also use Xcode’s Agents with the same SBB, its Xcode section may show VS Code拡張が設定済み (Set up by the VS Code extension). That means SBB adds no hooks of its own, so a result is not judged twice.
Check Judge results in SBB’s Dashboard
From the SBB menu bar icon, choose ダッシュボードを開く (Open Dashboard) to open the Dashboard. It shows today’s count of CONTINUE, FIX, and HUMAN_REQUIRED, the latest decision (with its reason or next instruction), and a history of past decisions.
SBB Dashboard (latest decision and history)
DISABLE / UNINSTALL
Turn off or remove
- Disable, or close VS Code: your Claude Code and Codex configuration stays exactly as it is. While the extension is not running, the hooks reach nothing and let every prompt pass. Re-enable it and it just works.
- Uninstall: the items the extension added are removed (its hook entries in
~/.claude/settings.jsonand~/.codex/hooks.json, its trust block in~/.codex/config.toml, and~/.sbi/hooks/). Your own hooks and settings are never touched. VS Code runs this cleanup once, the next time it starts after the uninstall. - An update (another version installed over it) removes nothing.
TROUBLESHOOTING
Troubleshooting
It stays at Not Connected
- Check that the extension is enabled and the workspace is trusted.
- Check the log in VS Code’s “SBI” Output Channel.
- Check that SBB is running.
“:8788 is occupied by a service that is not a compatible SBI Runtime”
Another program uses that port. Quit it and reload the VS Code window.
“the SBI Runtime on :8788 is outdated”
An older SBI Runtime is still running. It is not stopped for you. Quit it and reload the window.
Several VS Code windows are open
All windows share one Runtime (:8788). When the window that started it closes, another window starts a new one within about twenty seconds. An Agent run that was going through the closed window’s Runtime is interrupted.
The Agent’s executable cannot be found
The extension looks in this order: (1) the VS Code settings sbi.claudeCodeExecutablePath / sbi.codexExecutablePath, (2) the environment variables CLAUDE_CODE_EXECUTABLE_PATH / CODEX_EXECUTABLE_PATH, (3) PATH. If it is not found, you get a message naming which Agent is missing.
WHAT THE EXTENSION CHANGES
What the extension changes on your Mac
This is based on the extension’s README. Everything stays on your Mac.
- A local Runtime: listening on
127.0.0.1:8788only. - Claude Code hooks: it adds
UserPromptSubmitandStopto~/.claude/settings.jsonand puts a small helper in~/.sbi/hooks/. - Codex hooks: if Codex is installed, it adds the same two hooks to
~/.codex/hooks.jsonand records their trust in one clearly marked block in~/.codex/config.toml. - Read-only observation: to show whether an Agent is working, it reads Claude Code’s session files and Codex’s session transcripts. It never reads what you type in the terminal.
- What is sent: nothing goes to Sanary, and there is no telemetry. When a hook fires, your prompt, the working directory, and the Agent’s last reply go to the Runtime on this Mac, which passes them to SBB for judging if SBB is running.