Which VPS Passes Your Claude Code Load Test?

Replay the same concurrent Claude Code workload and recovery drill on each VPS. Shortlist hosts that meet your RAM reserve, batch deadline, and recovery target in every measured trial.

Measure the host during overlapping builds

For a self-hosted Agent SDK deployment, the unit under load is a running Claude Code subprocess plus whatever its shell starts. Benchmark the VM with a fixed set of tasks in separate worktrees and replay the same commit, concurrency, dependency cache condition, and toolchain on every candidate. Start builds at the same point in the replay, then record peak memory for the whole host and wall time until the last task finishes. A cheap shared VM that completes a solo run in 80 seconds but needs 260 seconds when three builds overlap misses a 180-second batch deadline even if it has spare RAM. Repeat the batch at different times on shared hosts. If timing varies, retain the slow run in the comparison and collect CPU and disk observations before paying for more memory.

Hosting the Agent SDK - Claude Code Docs

Time the first useful action after recovery

The Agent SDK stores transcripts locally by default and documents using a SessionStore adapter to resume on another host from a matching working directory. Run a staging drill with a disposable checkout, a session that remembers a harmless marker, and a known uncommitted file change. Start the timer when the replacement host is requested. Stop it only after the resumed session can report the marker and your verification confirms the expected Git revision and file change. A transcript restored in 20 seconds and a checkout restored in 140 seconds produce a recovery time of at least 140 seconds. Record a failed or incomplete restore explicitly. If replacing the host loses the file change, add a workspace recovery mechanism and rerun the drill before comparing that plan against a host with persistent workspace storage.

Persist sessions to external storage - Claude Code Docs

Size the box with concurrent work

Start on a candidate that meets your control and access requirements. Install Claude Code using the instructions for its operating system and authenticate. In a disposable checkout, run the same work on each host with the same dependency versions. Record elapsed time, peak memory, lowest free disk space, and whether the agent and build processes finish. Keep the output so you can distinguish a process exit from a model response that arrived late.

In an illustrative trial, two operators share a 400 MB repository and each may run the full test suite. Give each a separate worktree and run both suites together three times. Suppose your acceptance rule is completion every time within ten minutes, with at least 5 GB of disk free. If a candidate only passes when the jobs run serially, choose a larger configuration or agree to serialize work.

Common workflows - Claude Code Docs

Practice recovering the checkout and session

For a self-hosted Agent SDK deployment, the Claude CLI subprocess has a shell, a working directory, and session files on disk. Inventory the checkout, session state, and credentials you need to restore. Define a recovery target in minutes and write down which unfinished work can be rerun. Give the operator a way to tell whether a restarted agent is working in the intended directory.

On a trial host, create a disposable branch with one uncommitted edit, record the session identifier, and restart the host while the agent is idle. Verify the edit is present, reconnect, and ask about a decision made before the restart. If the conversation comes back but the edit is missing, address checkout persistence. If the files return but the session cannot be located, check the session storage and the working directory used on restart.

Hosting the Agent SDK - Claude Code Docs

Sources