go test ./... after every edit, pnpm typecheck, golangci-lint run, a Playwright suite before it calls the task done. One session does this comfortably on a laptop. Three or four in parallel, each with git hooks that run the same checks again, saturate it, and every session slows down together.
Ankra Workspaces move that work to a warm pod on your organisation’s CI pool. This guide sets Claude Code up so that every session uses it without Claude typing anything different: the same commands, the same output, the same exit codes, with the CPU and memory spent on the pool instead of your machine.
Claude Code runs the same commands; the heavy ones run in the workspace
Prerequisites
- A repository whose checkout can already use a workspace:
ankra exec --checkexits0in it. If it does not, work through Run tests and lint in Ankra Workspaces first. That page covers logging in, theworkspaces.usepermission, connecting the repository and the workspace profile. - Claude Code installed and working in that repository.
1. Put the shims on Claude’s PATH
ankra dev install links shims for go, gofmt, golangci-lint, pnpm, npm and npx into ~/.local/bin. Claude Code’s Bash tool starts from your shell profile, so the shims reach Claude only when ~/.local/bin comes before the real tools in that profile. Add the PATH line ankra dev install prints to ~/.zshrc or ~/.bashrc if it asked you to, then start a new Claude Code session; a running session keeps the shell it started with.
Check from inside the session. The ! prefix runs a command in Claude Code’s own shell:
~/.local/bin, and the second route. A path to the real go, or local, means the session does not see the shims; see Troubleshooting.
Nothing about Claude’s permission rules changes: Claude still runs go test, so an existing Bash(go test:*) allow rule keeps working.
2. Configure the project’s Claude Code settings
Add these to the repository’s.claude/settings.json (shared with the team) or .claude/settings.local.json (just you):
ANKRA_EXEC: remoteroutes exactly like the defaultauto, but when a routable command has to run locally - the workspace is unreachable, you are logged out - the shim says so in one line. That line lands in the session transcript, so you can see when a session quietly went back to building on your laptop. It applies to Claude’s commands only; your own terminal keeps the modeankra dev modeset.- The Bash timeouts. Claude Code stops a command after two minutes by default. A routed command waits for a workspace that is still provisioning (up to 15 minutes,
ANKRA_EXEC_WAIT_TIMEOUT) and then runs the whole suite, so the default cuts off exactly the runs you wanted offloaded. Set the values to your slowest full suite plus a margin. When Claude Code does stop a routed command,ankra execstops the remote command too: it handlesSIGINTandSIGTERMlike Ctrl-C. - The permission rules let Claude run
ankra execfor a command the shims leave local, and check or wake the workspace, without a prompt each time. Leave outankra workspace down; tearing a workspace down is your call.
3. Warm the workspace when a session starts
A workspace that has not been used for 24 hours is torn down, and the first command after that waits a few minutes while a new one is provisioned. ASessionStart hook asks for the workspace as the session opens, so it is warm by the time Claude runs its first test.
Save this as .claude/hooks/warm-ankra-workspace.sh and make it executable (chmod +x):
ankra exec --checkis cached for an hour, so the hook costs nothing on a checkout that cannot use a workspace, and exits quietly there.ankra workspace upwithout--waitreturns as soon as provisioning starts; the session does not wait for it.- The
echois what Claude Code adds to the session’s context, so Claude knows from its first turn where its builds run. - If the repository has more than one workspace kind (a
nodeore2eprofile), add anankra workspace up --kind <kind>line for each kind your sessions use.
4. Tell Claude how the build works
The shims are transparent, but Claude still carries habits from building on a shared laptop: narrowing a test run to one package to keep the machine responsive, or treating a provisioning message as a failure. Add a block like this to the repository’sCLAUDE.md:
CLAUDE.md tells agents to run one lint or typecheck at a time to protect the laptop, scope that rule to commands that run locally. Routed commands share the workspace’s memory through its own run-slot queue instead.
5. Give every parallel session its own worktree
Run each parallel Claude Code session in its own git worktree, not several sessions in one checkout:resources.memory is shared by every command running in it at once, and heavy commands queue for a share of it. A wait shows as [devbox] got a run slot after Ns. If you regularly run several sessions and those waits grow, raise resources.cpu and resources.memory in the repository’s workspace profile rather than running fewer sessions.
Verify
Start a session in the repository and ask Claude for a normal task that ends in a test run, for example “Run the test suite and fix anything that fails”. Then, in another terminal:rc= (the exit code), mode=remote/api, the wall time and the command. A line with mode=not-run/api is a command that could not run in the workspace and ran locally instead; its reason is in the session transcript.
Troubleshooting
For problems with the workspace itself - provisioning, connecting the repository, the profile - see the Workspaces troubleshooting table.
Turn it off
ANKRA_EXEC from .claude/settings.json too, since it overrides ankra dev mode for Claude’s commands.
See also Pipelines with Claude Code, Codex and the Claude app for letting the same sessions watch and fix their CI runs, and the CLI reference for ankra exec, ankra dev and ankra workspace.