The owner's workstation¶
The owner's workstation is a notebook running Windows. Since 2026-11-21 it is the owner's desk, and autonomous agents run on Linux only (#947).
What it runs:
- Claude Desktop, to monitor the sessions and answer their questions;
- answers to blocked sessions over Remote Control;
- the intake session and the research session, each in its own session;
- the overall coordinator and the watcher
(operator-and-watch.md), which moved here from the Linux host;
the operator's desk (
ops:operator) is not among them: it stays in the home session on the Linux host (#973); - Claude Code in the terminal, which reaches the Linux host over SSH.
What it does not run: workers, a repository's coordinator, or Docker Sandboxes. Those run on the Linux hosts (linux-host.md). The Windows sandbox work is on hold (Sandboxes).
Most of what differs from the host follows from one fact: %USERPROFILE%\.claude is synced to
Google Drive, so anything written there leaves the machine.
Setting up from scratch¶
host-base.ps1 of dev-env:ops-doctor sets up the machine in order and says what is still
missing; its steps, and which of them are the owner's, are in
remote-access.md, A Windows host (plugins/dev-env/skills/ops-doctor/remote-access.md).
Run it from the root of this checkout, so that dev-doctor finds sandboxes.conf: check, then
plan, then apply after the owner's yes. After each owner step it stops at, run apply again.
- Tokens live in the user environment (
HKCU), never in a settings file under.claude(secrets.md).dev-env:dev-doctorsets and checks them with hidden input. With Bitwarden Secrets Manager,vault.ps1ofdev-env:ops-doctorsyncs them from theopsandownerprojects into the user environment (#413). The scheduled taskops-vault-syncdoes that hourly, andvault.ps1 refreshdoes it at once after a rotation (#479). Setup and the subcommands: ops-doctor remote-access.md (plugins/dev-env/skills/ops-doctor/remote-access.md). - The environment check is the same script as on Linux. Run it through the
dev-env:dev-doctorskill or, from the root of this checkout, with.\scripts\dev-doctor.ps1(-Fixto repair). It covers the toolchain, PowerShell modules, git identity, line endings, MCP logins and worktrees. - The JDK comes from the build (#353). In a Gradle repository the build declares its Java
toolchain. Gradle finds that JDK, or provisions it into
%USERPROFILE%\.gradle\jdksthrough the foojay resolver insettings.gradle.kts;dev-doctorchecks both with.\gradlew.bat -q javaToolchains. A system JDK (Temurin 25 by winget) is only what Gradle starts on, and what a repository without a wrapper builds with. -
Git identity. The owner commits as
<owner login>with an@lauper.netaddress.gh auth loginandGITHUB_PERSONAL_ACCESS_TOKENact as the owner's account, whose login is the user environment variableCLAUDE_GITHUB_LOGIN.dev-doctorwarns when an email is at another domain and, when the variable is set, whenghacts as another account. It recognises the owner's machine by itself (header linemode: owner). Set the variable once, in PowerShell, then open a new terminal:[Environment]::SetEnvironmentVariable('CLAUDE_GITHUB_LOGIN', '<login>', 'User')The bot sessions in WSL2 commit as
Claude Agentwith the bot's@lauper.netaddress instead (#174). -
Line endings. Every text file is LF on every checkout (
.gitattributes). A clone made before that rule keeps CRLF files until they are checked out again, whichdev-doctorreports. - Tokens on the host are rotated from here with
scripts/windows/Invoke-RemoteRotate.ps1, which runsrotate.shon the host over SSH (scripts/windows/README.md, token-rotation.md). - A Desktop session on the host runs the workstation's plugin copies, not the host's (desktop-remote.md).
- Git hooks. Nothing is pushed from this machine, so its pre-push hook does not run, and
running the gate in Git Bash here is unsupported: Windows is supported only as the owner's
workstation, not for agents, and CI no longer tests Windows
(ci/checks.md). Windows-only failures, such as CRLF from
jq.exe, used to show up first in that hook.
Sandboxes¶
On hold: Windows sandboxes are not in use since 2026-11-21. Agents run on the Linux hosts only (#947; the reasons are in lessons-learned.md). What follows describes the built setup and is kept for the day the work resumes.
As on the Linux host, a repository's coordinator and its workers could run in one Docker Sandbox
(sbx) per repository (linux-host.md).
scripts/windows/Sandboxes.ps1 manages them (README (scripts/windows/README.md)),
and scripts/windows/sandboxes.conf lists them. The sandbox runs in clone mode:
- sbx clones the checkout into the VM at the checkout's path in drive form (
D:\aise\claude→/d/aise/claude), where the coordinator starts; - sbx mounts the checkout itself read-only, so a sandbox cannot change the script the logon task runs.
Once, by the owner, from the main checkout:
winget install -h Docker.sbx, thensbx loginin a terminal (a browser sign-in). The script findssbx.exethrough$env:SBX,PATHor%LOCALAPPDATA%\DockerSandboxes\bin.-
The values, all from the Bitwarden project
dev(#625, #790). The only value entered on the workstation is thedevaccess token; everything else the helper andsetupread fromdevthroughbws, entrySBX_<name>first, else<name>(secrets.md).devholds:GITHUB_PERSONAL_ACCESS_TOKEN, the bot's gh token. It has to be a classic token: setup refuses a fine-grainedgithub_pat_one (#260);AIKIDO_API_KEYandCONTEXT7_API_KEY;SBX_GEMINI_API_KEYorGEMINI_API_KEY, agy's Gemini API key (secrets.md);SBX_GIT_IDENTITYorGIT_IDENTITY, the bot account's commit identity, one lineName <email>approved by the owner (below).
Then, once:
- Make an access token with read access to
devin the web vault. - In a terminal of the owner's, run
.\scripts\windows\Sandboxes.ps1 dev-token. Not in a Claude Desktop session: its writes under%LOCALAPPDATA%land in its package folder. The command asks for the token with hidden input, checks withbwsthat it reads exactly one project (or the onePROJECT_IDofsbx-token.envnames, when that is set), and stores it DPAPI-encrypted asdev-access-tokenbeside the helper. - Run
.\scripts\windows\Sandboxes.ps1 install-helper. It copies the token helpersbx-token.ps1to%LOCALAPPDATA%\claude-sandbox\, outside every folder a sandbox can mount (secrets.md). Run it again after the helper changes;statussays when the copy is outdated.
%LOCALAPPDATA%\claude-sandbox\sbx-token.envis an optional override:BWS_SERVER=(defaulthttps://vault.bitwarden.eu) andPROJECT_ID=, which is needed only when the access token reads no project or several. Keys left inHKCUfrom before #790 are not read for the sandboxes, andSBX_GITHUB_TOKENis not read at all. -
.\scripts\windows\Sandboxes.ps1 setupdoes, in order:- the network policy:
balancedplus the hosts of the network allowlist, a dropped host removed, a rule the list does not name reported (-PruneNetworkremoves it); - Remote Control allowed in sandboxes: the sbx setting
claude.remoteControlset totruewhen it is not. It defaults tofalse, and sbx's proxy then withholds the Remote Control responses, so a sandbox's coordinator drops off claude.ai and messages to it never arrive (#831).statusshows it in the== sbx ==block; - the values read from
devwith one listing. When the access token reads no project or several andsbx-token.envnames none, it prints!!naming them and stops: nothing is created; - the secrets, each a command that runs the helper. It prints one row per secret whose
key is missing in
dev, and one for all while the helper is missing. A custom secret reaches only the sandboxes created after it, so the secrets come before the sandboxes; - each listed sandbox created, with the
memory=andcpus=of its line as--memoryand--cpuswhen it gives them (#833). sbx reads the size only at create: an existing sandbox whose size differs from its line gets a--note and is left as it is, since changing it takessbx rm; python3-venvand ICU (pwsh aborts without it) installed as root inside the VM when missing:scripts/linux/sandbox-root-packages.shthroughsbx exec -u root, with nothing elevated on the workstation. A sandbox where apt fails is not provisioned (#638);- provisioning with
scripts/sandbox/sandbox-provision.sh, whose last step applies the user-level baseline withCLAUDE_GITHUB_OWNERof the user environment as its owner (claude-baseline.md); - the coordinator configured (
base_dir=/home/agent/worktrees,session_board_machines=<sandbox>=<workstation>).
sbx keeps a secret's value for 55 minutes (
--refresh 55m, #721), so a rotated token reaches the sandboxes within that time; after a rotation indev,Sandboxes.ps1 refresh-secretshands it to them at once (secrets.md).The template. A new sandbox is created with
-t docker/sandbox-templates:claude-code(SANDBOX_TEMPLATEoverrides it), as on Linux (linux-host.md). Without-t, sbx 0.51 uses the Debian agent kitdocker.io/sbx/claude, which lacks the ICU,xz,nodeandjavathat provisioning needs (#665, #704). An existing sandbox keeps the image it was created from, andsetupcannot tell which one that is: it printssandbox <name> existseither way. A sandbox created before the template change shows it in provisioning, which reportsnode javamissing orxz: Cannot exec. The owner replaces such a sandbox:sbx rm <name>, thensetupagain. That loses the sandbox's disk (seesbx rmis the owner's below), so fetch its branches first.The commit identity. Inside a sandbox, sessions act as the bot account; only sessions started on the workstation outside a sandbox act as the owner. The bot account's commit identity, approved by the owner, is
Name <email>in the entrySBX_GIT_IDENTITYofdev, elseGIT_IDENTITY, and not in the repository.%LOCALAPPDATA%\claude-sandbox\git-identity, one line beside the token helper, overrides it;SANDBOX_IDENTITY_FILEnames another file.setuppasses it to provisioning, which:- writes it as
GIT_AUTHOR_*andGIT_COMMITTER_*and asgit config --globalinside; - sets the coordinator's
git_identitywhile it is unset. A different value already set inside is reported, not replaced.
setupalso passes the workstation's user ($env:USERNAME) and host ([Environment]::MachineName). So the coordinator inside names its workers and claims<user>:<workstation>/…, like its own session, rather than after the VM. A user or host name that is not a letter or digit followed by letters, digits,.,_and-(a user name with a space, say) is left out with a note, since provisioning would refuse it. The workers are then named after the VM;SESSION_USERorSESSION_HOSTsets a name it takes. Without an identity,setupnames both entries anddevand provisions without one;statusnames the entry or file it came from, never the identity. The provisioning is the same as on the Linux host (linux-host.md). - the network policy:
-
Sign Claude in to Anthropic, once, as the bot account (#753). sbx keeps the sign-in's OAuth tokens in its own store on the workstation, refreshes them, and puts the access token into every sandbox's requests. No token enters a VM, and none sits in
HKCU, Bitwarden or a file of these scripts (secrets.md).sbx exec -it claude claudeopens Claude Code inside theclaudesandbox.- Type
/loginand choose the Claude account with a subscription. - Claude Code shows a sign-in link; sbx may also open it in the workstation's browser. Sign in to claude.ai there as the bot account and approve the access. If the page shows a code, paste it into Claude Code.
- Claude Code reports the login. Leave it with
/exit. .\scripts\windows\Sandboxes.ps1 statusshowsok anthropic: the OAuth sign-in from /login, kept by sbxandok claude: signed in, api.anthropic.com answers 200.
A sandbox created while
setupstill set theCLAUDE_CODE_OAUTH_TOKENcustom secret keeps that variable, which Claude Code ranks above the sign-in;statusnames it. Replace it first:.\scripts\windows\Sandboxes.ps1 stop claude, fetch its branches,sbx rm claude, thensetupagain, then sign in. -
.\scripts\windows\Sandboxes.ps1 install-task: a per-user scheduled task, Claude Sandboxes, that runsstartat logon and every 15 minutes. A Claude Code session may not register persistence, so this step is the owner's;install-task -WhatIfshows the task. Its action runspwshthroughconhost.exe --headless, as the janitor task does: with Windows Terminal as the default terminal, a task'spwsh -WindowStyle Hiddenstill opens a terminal tab on every run (#841). A task registered before that change keeps the old action untilinstall-taskruns again. -
Antivirus exclusions (#834). While the sandboxes run, Microsoft Defender and Malwarebytes take the most CPU: they scan every block the VMs read and write. sbx's documentation gives no antivirus guidance (its troubleshooting page names none), so what follows is this repository's reasoning, path by path. Exclude only these:
What Belongs to Why the folder %LOCALAPPDATA%\DockerSandboxes\sandboxessbx the VM disks, cache and state; a VM rewrites them all the time, and a scan from outside sees the image's raw blocks, not the files inside the VM the process %LOCALAPPDATA%\DockerSandboxes\bin\sbx.exesbx the CLI and daemon that drive the VMs the process %LOCALAPPDATA%\DockerSandboxes\libexec\docker-docklet.exesbx the VM host process, about 5 GB working set while the sandboxes run: the bulk of the file traffic the process com.docker.sailorsbx ( libexec\lib\sailor.dllsits beside it), not yet confirmedruns while the sandboxes do; its path is not readable without admin, so it is not in the command below until the owner has read it Not excluded: Docker Desktop (
C:\Program Files\Docker\Docker\resources), which the sandboxes do not need, and the checkouts and worktrees onD:.Defender, once, in an elevated PowerShell (
%LOCALAPPDATA%written out, since an elevated shell of another account would expand it to that account's folder;statusprints the line with this user's paths):Get-Process com.docker.sailor | Format-List Path # read the sailor path first Add-MpPreference -ExclusionPath 'C:\Users\<user>\AppData\Local\DockerSandboxes\sandboxes' ` -ExclusionProcess 'C:\Users\<user>\AppData\Local\DockerSandboxes\bin\sbx.exe', 'C:\Users\<user>\AppData\Local\DockerSandboxes\libexec\docker-docklet.exe'Add the sailor path to
-ExclusionProcesswhen it lies underDockerSandboxes. Process exclusions are full paths, never bare names: a bare name would exempt any program that takes it.Sandboxes.ps1 statusshows one Defender row in its== sbx ==block and prints this command with this user's paths whenever it cannot confirm the exclusions; a normal user cannot read Defender's lists, so runstatuselevated once to seeok. The row never changes a setting orstatus's exit code.Malwarebytes: no script can read its settings. In Malwarebytes → Settings → Allow List, add the folder
%LOCALAPPDATA%\DockerSandboxes\sandboxesand the two (three, with sailor) programs above, with the same full paths. Its existing exclusion ofD:\does not coverC:.The risk left.
%LOCALAPPDATA%\DockerSandboxesis writable by this user without elevation. Anything running as the owner can drop a file into the excluded folder, or replace an excluded.exe, and neither scanner looks at it. That is the price of the exclusion, which is why it stays this narrow.
Moving a host coordinator into a sandbox (#833). The repository gets its line in
sandboxes.conf, <name> below; then, by the owner:
- The coordinator on the host finishes or parks its workers and pushes what it holds; then it is ended. Two coordinators on one repository and machine would start workers twice.
.\scripts\windows\Sandboxes.ps1 setupcreates and provisions<name>: plugins, workspace trust, the Gradle settings, mise for the repository'smise.toml, the line's worker cap. A sandbox that already exists is not recreated..\scripts\windows\Sandboxes.ps1 status: only if it shows no Anthropic sign-in, runsbx exec -it <name> claude, then/loginas in step 4 above. sbx's sign-in is global, so a second sandbox usually has it already..\scripts\windows\Sandboxes.ps1 start <name>starts the sandbox and its coordinator..\scripts\windows\Sandboxes.ps1 statusexits 0, and the coordinator shows on claude.ai's Remote Control as<user>:<machine>/<name>.
Each sandbox has its own push slot (parallel-work.md); what keeps
several within the workstation's memory is each line's memory= and workers=.
What differs from Linux, and why the script works the way it does:
- The 30 s auto-stop. A sandbox that only
sbx execwoke, or thatsbx createleft, stops 30 seconds after its last session disconnects, background processes included. Onlysbx run -dkeeps it running, sostartuses that. A sandbox someone woke by hand may still stop; the next watchdog run restarts it. - No stop window.
sbx stopsends SIGTERM to the VM's PID 1, and the VM is off about 50 ms later, before a session has written its transcript. Sostopfirst sends SIGTERM to every Claude process inside, waits up to 120 s for them to end, and only then runssbx stop. The watchdog starts a stopped sandbox again within 15 minutes. To keep one stopped, remove its line fromsandboxes.confor rununinstall-task. - The changing port. The host gets a remote
sandbox-<name>(git://127.0.0.1:<port>/…) whose port changes on every start, and which exists only while the sandbox runs. Fetch works, push is refused: work leaves the sandbox through GitHub or agit fetch sandbox-<name>. sbx rmis the owner's. It needs--forcewithout a terminal, and it deletes the sandbox's disk: branches that were never fetched, the plugins, tools and transcripts, and the sandbox-scoped secrets. The script never runs it. Changing a sandbox's checkout meanssbx rmby hand andsetupagain.- Sleep (a closed lid, the power button) suspends the whole machine, and nothing keeps it awake. After resume, the next watchdog run starts what stopped. What a suspend does to a running session is still to be measured, in #593.