Claude Code Servers That Survive Replacement
Compare required recovery artifacts with the backups retained and the files read successfully after replacement.
Choose a host by what must survive
Anthropic lists 4 GB or more of RAM for Claude Code, with x64 or ARM64 hardware and an internet connection. Use that as the starting point for a native installation on a Linux VPS or supported Mac. Size separately for your repository’s build and test tools. A VPS fits teams that can own system updates and backups. A Mac fits when you already operate one and can tolerate its outage and recovery profile.
A Docker host makes sense when your team can reproduce its environment and explicitly mount what must persist. A job sandbox makes sense when every run can start from a clean checkout and export its results. For E2B and Daytona, verify the runtime limit, disk behavior on stop and deletion, and artifact export path. Give each the same test job and attempt recovery after replacing the environment.
Include one known edit and one session transcript in the restore fixture. Recovering only the conversation can leave the next operator without the actual work product.
Advanced setup - Claude Code DocsRestore the transcript and workspace together
For an Agent SDK deployment you control, session transcripts are written locally by default. A SessionStore adapter can mirror them to external storage for resumption on another host with a matching working directory. Back up the workspace separately, including any uncommitted changes or generated artifacts your operator would need to continue. Document the image, working directory, and configuration used to restore both pieces.
In an illustrative drill, start a session on worker A, record its ID, and leave one uncommitted change to a test fixture. Replace the worker, restore the workspace at the matching path, and resume the session on worker B. The acceptance checks are that the prior conversation resumes and the expected diff is still present. If only one check passes, investigate transcript loading or workspace restoration according to which piece is missing.
Restore into an empty disposable workspace and read the expected files there. Seeing paths listed in a backup browser is an earlier checkpoint.
Persist sessions to external storage - Claude Code DocsCompare the full cost of a recoverable run
Compare hosting quotes using the same memory, persistent storage, backup retention, and operator coverage. For each offer, check the priced unit and billing rules for idle compute, stopped instances, and retained disk. Keep Anthropic usage separate. If you use the Agent SDK, reconcile its client-side cost estimates with provider billing before treating them as actual spend.
In an illustrative comparison, a VPS costs $12 per month for compute and $4 for backups. At a hypothetical $60 per hour, 30 minutes of maintenance adds $30, bringing the subtotal to $46 before model usage. A sandbox at an assumed $0.08 per compute hour for 150 hours costs $12 before storage, recovery labor, and model usage. Verify rates on the provider’s pricing page or quote for the exact configuration, then check a test invoice against the usage you recorded.
Track cost and usage - Claude Code Docs