Skip to content

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-doctor sets and checks them with hidden input. With Bitwarden Secrets Manager, vault.ps1 of dev-env:ops-doctor syncs them from the ops and owner projects into the user environment (#413). The scheduled task ops-vault-sync does that hourly, and vault.ps1 refresh does 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-doctor skill or, from the root of this checkout, with .\scripts\dev-doctor.ps1 (-Fix to 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\jdks through the foojay resolver in settings.gradle.kts; dev-doctor checks 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.net address. gh auth login and GITHUB_PERSONAL_ACCESS_TOKEN act as the owner's account, whose login is the user environment variable CLAUDE_GITHUB_LOGIN. dev-doctor warns when an email is at another domain and, when the variable is set, when gh acts as another account. It recognises the owner's machine by itself (header line mode: 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 Agent with the bot's @lauper.net address 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, which dev-doctor reports.

  • Tokens on the host are rotated from here with scripts/windows/Invoke-RemoteRotate.ps1, which runs rotate.sh on 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:

  1. winget install -h Docker.sbx, then sbx login in a terminal (a browser sign-in). The script finds sbx.exe through $env:SBX, PATH or %LOCALAPPDATA%\DockerSandboxes\bin.
  2. The values, all from the Bitwarden project dev (#625, #790). The only value entered on the workstation is the dev access token; everything else the helper and setup read from dev through bws, entry SBX_<name> first, else <name> (secrets.md). dev holds:

    • GITHUB_PERSONAL_ACCESS_TOKEN, the bot's gh token. It has to be a classic token: setup refuses a fine-grained github_pat_ one (#260);
    • AIKIDO_API_KEY and CONTEXT7_API_KEY;
    • SBX_GEMINI_API_KEY or GEMINI_API_KEY, agy's Gemini API key (secrets.md);
    • SBX_GIT_IDENTITY or GIT_IDENTITY, the bot account's commit identity, one line Name <email> approved by the owner (below).

    Then, once:

    1. Make an access token with read access to dev in the web vault.
    2. 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 with bws that it reads exactly one project (or the one PROJECT_ID of sbx-token.env names, when that is set), and stores it DPAPI-encrypted as dev-access-token beside the helper.
    3. Run .\scripts\windows\Sandboxes.ps1 install-helper. It copies the token helper sbx-token.ps1 to %LOCALAPPDATA%\claude-sandbox\, outside every folder a sandbox can mount (secrets.md). Run it again after the helper changes; status says when the copy is outdated.

    %LOCALAPPDATA%\claude-sandbox\sbx-token.env is an optional override: BWS_SERVER= (default https://vault.bitwarden.eu) and PROJECT_ID=, which is needed only when the access token reads no project or several. Keys left in HKCU from before #790 are not read for the sandboxes, and SBX_GITHUB_TOKEN is not read at all.

  3. .\scripts\windows\Sandboxes.ps1 setup does, in order:

    • the network policy: balanced plus the hosts of the network allowlist, a dropped host removed, a rule the list does not name reported (-PruneNetwork removes it);
    • Remote Control allowed in sandboxes: the sbx setting claude.remoteControl set to true when it is not. It defaults to false, 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). status shows it in the == sbx == block;
    • the values read from dev with one listing. When the access token reads no project or several and sbx-token.env names 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= and cpus= of its line as --memory and --cpus when 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 takes sbx rm;
    • python3-venv and ICU (pwsh aborts without it) installed as root inside the VM when missing: scripts/linux/sandbox-root-packages.sh through sbx 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 with CLAUDE_GITHUB_OWNER of 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 in dev, Sandboxes.ps1 refresh-secrets hands it to them at once (secrets.md).

    The template. A new sandbox is created with -t docker/sandbox-templates:claude-code (SANDBOX_TEMPLATE overrides it), as on Linux (linux-host.md). Without -t, sbx 0.51 uses the Debian agent kit docker.io/sbx/claude, which lacks the ICU, xz, node and java that provisioning needs (#665, #704). An existing sandbox keeps the image it was created from, and setup cannot tell which one that is: it prints sandbox <name> exists either way. A sandbox created before the template change shows it in provisioning, which reports node java missing or xz: Cannot exec. The owner replaces such a sandbox: sbx rm <name>, then setup again. That loses the sandbox's disk (see sbx rm is 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 entry SBX_GIT_IDENTITY of dev, else GIT_IDENTITY, and not in the repository. %LOCALAPPDATA%\claude-sandbox\git-identity, one line beside the token helper, overrides it; SANDBOX_IDENTITY_FILE names another file. setup passes it to provisioning, which:

    • writes it as GIT_AUTHOR_* and GIT_COMMITTER_* and as git config --global inside;
    • sets the coordinator's git_identity while it is unset. A different value already set inside is reported, not replaced.

    setup also 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_USER or SESSION_HOST sets a name it takes. Without an identity, setup names both entries and dev and provisions without one; status names the entry or file it came from, never the identity. The provisioning is the same as on the Linux host (linux-host.md).

  4. 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).

    1. sbx exec -it claude claude opens Claude Code inside the claude sandbox.
    2. Type /login and choose the Claude account with a subscription.
    3. 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.
    4. Claude Code reports the login. Leave it with /exit.
    5. .\scripts\windows\Sandboxes.ps1 status shows ok anthropic: the OAuth sign-in from /login, kept by sbx and ok claude: signed in, api.anthropic.com answers 200.

    A sandbox created while setup still set the CLAUDE_CODE_OAUTH_TOKEN custom secret keeps that variable, which Claude Code ranks above the sign-in; status names it. Replace it first: .\scripts\windows\Sandboxes.ps1 stop claude, fetch its branches, sbx rm claude, then setup again, then sign in.

  5. .\scripts\windows\Sandboxes.ps1 install-task: a per-user scheduled task, Claude Sandboxes, that runs start at logon and every 15 minutes. A Claude Code session may not register persistence, so this step is the owner's; install-task -WhatIf shows the task. Its action runs pwsh through conhost.exe --headless, as the janitor task does: with Windows Terminal as the default terminal, a task's pwsh -WindowStyle Hidden still opens a terminal tab on every run (#841). A task registered before that change keeps the old action until install-task runs again.

  6. 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\sandboxes sbx 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.exe sbx the CLI and daemon that drive the VMs
    the process %LOCALAPPDATA%\DockerSandboxes\libexec\docker-docklet.exe sbx the VM host process, about 5 GB working set while the sandboxes run: the bulk of the file traffic
    the process com.docker.sailor sbx (libexec\lib\sailor.dll sits beside it), not yet confirmed runs 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 on D:.

    Defender, once, in an elevated PowerShell (%LOCALAPPDATA% written out, since an elevated shell of another account would expand it to that account's folder; status prints 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 -ExclusionProcess when it lies under DockerSandboxes. Process exclusions are full paths, never bare names: a bare name would exempt any program that takes it. Sandboxes.ps1 status shows 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 run status elevated once to see ok. The row never changes a setting or status's exit code.

    Malwarebytes: no script can read its settings. In Malwarebytes → Settings → Allow List, add the folder %LOCALAPPDATA%\DockerSandboxes\sandboxes and the two (three, with sailor) programs above, with the same full paths. Its existing exclusion of D:\ does not cover C:.

    The risk left. %LOCALAPPDATA%\DockerSandboxes is 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:

  1. 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.
  2. .\scripts\windows\Sandboxes.ps1 setup creates and provisions <name>: plugins, workspace trust, the Gradle settings, mise for the repository's mise.toml, the line's worker cap. A sandbox that already exists is not recreated.
  3. .\scripts\windows\Sandboxes.ps1 status: only if it shows no Anthropic sign-in, run sbx exec -it <name> claude, then /login as in step 4 above. sbx's sign-in is global, so a second sandbox usually has it already.
  4. .\scripts\windows\Sandboxes.ps1 start <name> starts the sandbox and its coordinator.
  5. .\scripts\windows\Sandboxes.ps1 status exits 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 exec woke, or that sbx create left, stops 30 seconds after its last session disconnects, background processes included. Only sbx run -d keeps it running, so start uses that. A sandbox someone woke by hand may still stop; the next watchdog run restarts it.
  • No stop window. sbx stop sends SIGTERM to the VM's PID 1, and the VM is off about 50 ms later, before a session has written its transcript. So stop first sends SIGTERM to every Claude process inside, waits up to 120 s for them to end, and only then runs sbx stop. The watchdog starts a stopped sandbox again within 15 minutes. To keep one stopped, remove its line from sandboxes.conf or run uninstall-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 a git fetch sandbox-<name>.
  • sbx rm is the owner's. It needs --force without 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 means sbx rm by hand and setup again.
  • 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.