In one line: when sizing a server for Claude Code, many people ask first whether they need a GPU or 64GB — but those questions often point in the wrong direction. The sections below break it down by memory budget, three-tier comparison, and scenario decision matrix: how much Claude Code itself uses, which companion workloads actually eat RAM, who 16GB / 24GB / 64GB each fit, and how to trial on Cloud Mac before buying hardware when you're unsure. We won't repeat the screenshots from the week-long field notes, but we reference the same numbers.
First, fix a misconception: Claude Code doesn't need a GPU — and doesn't load model weights locally
Claude Code runs its inference on Anthropic's cloud. Your server (or Mac mini / Cloud Mac) handles:
- Git and the file system — read the repo, write patches, run
git diff - Tests and builds —
pnpm test,xcodebuild, Postgres in Docker - Terminal Agent runtime — CLI process, index cache, MCP connections
- Optional local inference — Ollama / MLX for embeddings, log summaries (parallel to the Claude API; no model weights for Claude itself)
So "how much RAM for a Claude Code server" really means "what else are you asking this machine to do?" A headless node running CLI + SSH only, versus a desktop workstation with browser + IDE + Ollama + Runner all open, get completely different answers.
TL;DR
- Claude Code alone → 16GB is enough
- Claude Code + daily dev desktop + occasional CI → 24GB (2026 recommended default)
- Multiple concurrent Runners + resident 32B local model + multiple Agents → 64GB (Mac Studio / high-spec Cloud Mac)
Memory budget: what's fighting for RAM besides Claude Code
Below uses M4 Apple Silicon unified memory as the baseline (same source as the 16GB vs 24GB benchmarks and workload scheduling), listing steady-state usage and peak notes:
| Component | Layer | Typical usage | Peak / notes |
|---|---|---|---|
| macOS + system cache | L0 | 3–4 GB | Relatively stable |
| Claude Code workspace | L3 | 1–3 GB | Large repos, many MCPs push toward the high end; excludes Claude model weights |
| Browser + IDE | L3 | 2–6 GB | Chrome with 12–20 tabs often hits 4GB+ |
| GitHub Runner job | L1 | 2–6 GB (steady) | xcodebuild link phase spikes +4–8 GB |
| Docker (Postgres, etc.) | L1 | 0.5–2 GB | Common for Next.js / full-stack repos |
| Ollama · qwen3:8b | L2 | 5–7 GB | Releasable via ollama stop |
| Ollama · qwen3:14b | L2 | 9–13 GB | Coexisting with CI easily triggers Swap |
| Ollama · 32B tier | L2 | 18–22 GB | Not suitable as a resident model on 16/24GB machines |
Rough math for three typical daily loads (excluding compile spikes):
- Claude Code only (headless): L0 + L3 ≈ 5–7 GB → 16GB has headroom
- Claude Code + desktop + resident 8B: ≈ 13–17 GB → 16GB edges into Swap, 24GB is comfortable
- Claude Code + CI + 14B: ≈ 20–26 GB → requires 24GB and stop before CI
Causal chain: Claude Code delegation → local memory pressure
24GB · correct framing
- Claude Code itself is light
- Budget for build peaks
- 8B and CI off-peak
- Target: Swap = 0
Common misjudgments
- Buy RTX / 64GB for Claude
- Ignore Ollama's 7GB resident footprint
- CI and 14B both at full load
- Treat Swap as "good enough"
Core logic: Claude Code server memory sizing is about the unified memory pool for companion workloads, not the Claude model itself.
16GB: it runs Claude Code, but with hard limits
Best for: tight budgets, API-first workflows, no resident large local models; or a headless server running Claude Code CLI + lightweight scripts only.
| Dimension | 16GB performance |
|---|---|
| Claude Code + terminal only | Smooth; memory pressure green |
| + Chrome many tabs + VS Code | Usable; limit tab count |
| + resident Ollama qwen3:8b | Swap ~ 1.1GB (benchmarked); pressure yellow |
| + resident 14B | Swap 2.3GB+; not recommended |
| + xcodebuild peak | Must ollama stop before CI; otherwise severe lag |
16GB survival rules (see L2-Q03 · how to schedule on 16GB):
- No resident 14B during the day; 8B only for overnight batch jobs
ollama stop+sleep 30before every CI run- Default "desktop + 8B + Claude Code all online" → go straight to 24GB; scheduling can't beat a hardware ceiling
Swap red line: if Swap > 0.5GB for more than 5 minutes during a Claude Code delegation, terminal responsiveness drops noticeably — that's not slow API, it's the local memory pool getting exhausted.
24GB: the sweet spot for most Claude Code teams in 2026
Best for: a machine used as your daily driver — Claude Code + IDE + browser + Docker + occasional GitHub Runner; 8B on demand during the day or 14B for overnight batch jobs.
Same Next.js SaaS repo (~90k lines), Stripe subscription delegation task (L3 field notes):
| Metric | 24GB M4 Mac mini |
|---|---|
| Memory used (steady) | 19.4 GB (Chrome 12 tabs + VS Code + Docker Postgres) |
| Swap | 0 |
| Delegation time | 18 min · 47 files changed · 95% tests passing |
| CPU peak | 58% (during pnpm test, not model inference) |
Compared to 16GB in the same scenario running qwen3:8b: 13.2GB used, 1.1GB Swap, yellow pressure; 24GB same scenario 16.4GB used, zero Swap, green pressure — compute differs by only ~9%, but multitasking responsiveness is a full tier better.
Recommended 24GB stack:
- Daytime:
nomic-embed-textresident (<1GB) + Claude Code API - CI events:
ci-prestops 8B/14B so xcodebuild gets priority - Overnight:
qwen3:8bor 14B for log / embedding batch jobs
2026 default recommendation: if budget allows, prioritize 24GB for a Claude Code workstation / cloud host. Money saved on 16GB often comes back in time lost to Swap within the first year.
64GB: when it's actually worth it
Not for "making Claude Code smoother" — Claude inference isn't local; 64GB won't make a single delegation twice as fast.
Worth it when any of these apply:
| Scenario | Why 64GB | Typical hardware |
|---|---|---|
| Resident 32B+ local model | qwen3:32b weights + KV + desktop ≈ 28–38GB | Mac Studio 64GB |
| Multiple concurrent Runner xcodebuild | 2–3 link peaks each +6–8GB | Mac Studio / multiple Cloud Macs |
| Dual Agent workspaces | Claude Code + OpenHands each 2–4GB indexing | Team shared build machine |
| MLX compile + Xcode on same machine | Peaks sharper than Ollama, can spike instantly | ML engineer workstation |
| 24/7 autonomous Agent | Resident execution plane + Runner + local RAG 14B never unloaded | See 24/7 Agent deployment guide |
If you're only doing 8B–14B + daily Claude Code development, M4 Mac mini 24GB offers better value. When you need 64GB unified memory, consider Mac Studio or a high-spec Cloud Mac; you can also trial on cloud for a week and watch the Memory Pressure curve.
Scenario decision matrix: pick your tier in one table
| Your scenario | Recommended RAM | Notes |
|---|---|---|
| Individual · Claude Code CLI only · no local model | 16GB | Headless SSH or lightweight terminal |
| Individual · Claude Code + daily IDE + browser | 24GB | Most common 2026 setup |
| Full-stack · Claude Code + Docker + 8B off-peak | 24GB | Requires stop-before-CI discipline |
| iOS team · Claude Code + self-hosted Runner | 24GB minimum | Frequent pushes: 24GB + scheduling |
| Resident 14B by day + CI at the same time | 24GB (strict scheduling) or 64GB (peace of mind) | 16GB not enough |
| 32B local inference + Claude Code on same machine | 64GB | Or move local model to a second machine |
| 2+ parallel Runners · large monorepo | 64GB or multi-node | Single 24GB machine often Swap during link phase |
| Uncertain load · validate before buying hardware | Cloud Mac 24GB trial 1–2 weeks | Watch Swap and delegation time before deciding |
Cloud Mac trial vs buying a Mac mini
Picking the wrong memory tier costs the most in time — Claude Code delegations under Swap often hurt efficiency more than the API bill.
| Path | Advantages | Best for |
|---|---|---|
| Rent Cloud Mac first | Trial 16/24GB by the week; run Claude Code + Runner on a real repo; no hardware depreciation risk | Not sure you'll use it daily yet |
| Buy Mac mini 24GB outright | Long-term fixed desk; low power; data stays local | Already confirmed daily Claude Code + dev |
| Mac Studio 64GB | Unified memory ceiling; multiple Runners / 32B | Team build machine or ML pipeline |
Our approach in the field notes: before ordering a physical M4 Mac mini, run the same repo's Claude Code workflow on Cloud Mac for three straight days — confirm you'll use it every day, then pay for hardware. Memory tier works the same way: open Activity Monitor, watch Memory Pressure color and Swap Used — more reliable than spec sheets.
7-step pre-purchase checklist
- List companion workloads: Claude Code only? Or + Runner + Ollama + Docker?
- Run a full delegation on a real repo (including tests), record peak memory
- Watch Swap Used: is it > 0 during delegation?
- If you have CI: simulate a push triggering
xcodebuild, check if it stacks with Ollama - Cross-check the decision matrix above for an initial 16 / 24 / 64GB pick
- Still unsure → Cloud Mac trial for 1–2 weeks before buying
- Once decided, set up the 30-second Runbook (stop before CI) — avoid "right RAM, wrong schedule"
How this fits the series
- L3 · Claude Code field notes — source of the 24GB delegation numbers.
- L2-Q02 · 16GB vs 24GB — Ollama Swap comparison benchmarks.
- L2-Q03 · Workload scheduling — scheduling Runbook after you buy the right RAM.
- 24/7 Agent deployment — higher memory requirements for a resident execution plane.
- Cloud Mac vs local Mac — node form factor sizing.
L3-Q04 · this article — externally answers "how to choose 16/24/64GB for a Claude Code server"; internally it's the procurement decision interface between the L3 coding layer and L2 memory layer.
FAQ
What is the minimum RAM for a Claude Code server?
CLI + lightweight terminal only: 16GB. Default desktop + IDE + browser + local 8B: 24GB recommended.
Does Claude Code need a GPU?
No. Inference is in the cloud; local GPU sits nearly idle during Claude Code delegations. Buying a GPU for local 70B has nothing to do with Claude Code workflows.
Can 16GB run Claude Code + GitHub Runner?
Yes, but with scheduling. Must stop Ollama before CI; avoid resident 14B. For a long-term daily driver, 24GB is still the better call.
Is 24GB the best value?
For most 2026 "Claude Code + daily dev + 8B/14B off-peak" setups, 24GB is the sweet spot — benchmarks show zero Swap on mid-to-large repo delegations.
When should you go to 64GB?
Resident 32B+, concurrent Runners, dual Agents, or large MLX pipelines. Going to 64GB just for Claude Code itself is usually overkill.
Can a Linux VPS replace a Mac?
For pure backend repos, yes; iOS / macOS builds, Xcode, and signing require macOS. Mixed teams often co-locate Claude Code and Runner on macOS nodes.
Can it still lag with enough RAM?
Yes — if Ollama and xcodebuild both hit full load, the issue is scheduling, not absolute capacity. On a 16GB hard ceiling, scheduling can't save "desktop + 8B + CI" all running at once.
Not sure which tier?
Trial Claude Code on Cloud Mac with your real repo first
Use Memory Pressure and Swap curves to verify whether 16GB is enough before deciding to buy hardware or rent 24GB cloud long-term.
View Cloud Mac plans