I ran claude-code-local on my 16GB Mac. Same server, same model: 7/45 to 32/45 by changing how memory is attached
On the same MLX server and the same 4B model, changing only how Claude Code's memory reaches the model took correct answers from 7 to 32 out of 45.
claude-code-local is a popular way to run Claude Code on local models on a Mac. I wanted to know whether it is the right starting point for a 16GB MacBook, so I ran it next to my own setup on the same M5 MacBook with 16GB RAM.
Short answer: its server fits in 16GB (peak 6.9 to 9.7GB in my runs), but its 16GB launcher turns memory off, and its 16K context is tight for agent work. Out of the box it rarely knows anything about your past work. What decided accuracy was how memory reached the model.
Two terms first. Claude Code keeps notes about past work in memory files and puts an index of them (MEMORY.md) into every request; the index is mostly links to files. The recall hook is a small script I wrote that, for each prompt, attaches only the memory lines related to it (up to 2,400 characters) instead of the index.
The test was 45 questions about my own past work, each with a known correct answer, written by a separate agent from my memory files (78 files).
The results
For each question, six answers were shuffled and graded blind against the gold answer by two judges, Sonnet and Opus. They agreed on 264 of 270 labels; the table uses Opus.
| Setup | Correct (45) | Made-up | Median time |
|---|---|---|---|
1. claude-code-local 16GB tier as shipped (Qwen3.5-4B bf16, 16K, --bare) | 7 | 2 | 55s |
2. Same server + full MEMORY.md index | 7 | 5 | 119s |
| 3. Same server + recall hook | 32 | 3 | 50s |
| 4. Same server + Qwen3.5-9B 4bit, 64K + recall hook | 28 | 3 | 28s* |
| 5. Ollama qwen3.5:9b Q4_K_M, 64K + recall hook | 38 | 1 | 56s* |
*Measured in a separate block or on an earlier day, so compare time only within rows 1–3.
A made-up answer states a specific fact about my records that the memory files contradict. The hook picks lines with a local embedding model (bge-m3) plus keyword search.
How to read it
Rows 2 and 3 are the clean comparison. Same server, same model, same day; only the memory handling changes. 7 → 32, far beyond chance (McNemar p<0.0001). Row 3 was also faster than row 2 on 36 of 50 questions. The full index made the first request about 8.3k tokens instead of 4.5k, and it added no correct answers: the index is mostly links to files, not facts.
Row 1 is not an accuracy score for claude-code-local. Its 16GB launcher runs Claude Code with --bare, which turns hooks, auto-memory and CLAUDE.md off on purpose. The row shows what you get out of the box on questions about your own past work.
Rows 4 and 5 are not "MLX vs Ollama". Both use a 9B model and the hook, but that server rewrites Claude Code's system prompt and slims the tool descriptions, and the Ollama answers come from earlier runs (re-graded in the same blind batch). The 38 vs 28 gap is unlikely to be chance (p=0.02), but any of those differences could explain it.
Two smaller findings:
- The 9B 4bit model on that server peaked at 6.9GB; the 4B bf16 model the 16GB tier ships with peaked at 9.7GB.
- I also gave the shipped tier and the 9B setup five small coding tasks with tests, twice each. With 16K context, 9 of 10 runs of the shipped tier stopped when the conversation outgrew the context limit, and none passed. The 9B setup at 64K never hit the limit and passed 3 of 10.
How I kept it honest
| Risk | What I did |
|---|---|
| Tuning to the test | Criteria written before measuring; questions from an agent that never saw the retrieval code |
| Judge bias | Six answers shuffled per question, two judges, labels compared |
| Order effects | The three same-day setups rotated through all six orders |
| Sleep, power | Charger and sleep state logged per run; no sleep during the run |
| Mid-run bugs | A script error stopped the 9B block after one question. Fixed and resumed with the same questions and settings, and logged |
All of this is one Mac, one person's memory files, and LLM judges.
Try the hook
My earlier post covers how the hook was built and measured on Ollama alone (20 → 37 correct on the same questions): https://dev.to/justjinoit/claude-code-on-a-16gb-mac-with-ollama-90s-56s-by-attaching-only-relevant-memory-5332
The hook, install script, preregistration log and scripts are in the repo: https://github.com/JustJinoIT/claude-local-kit
git clone https://github.com/JustJinoIT/claude-local-kit && cd claude-local-kit ./install.sh # Ollama qwen3.5:9b (64k) + bge-m3 claude-local Before you pick a local setup
- Does your launcher turn memory off (
--bare)? - How many tokens does your first request carry before the question?
- Does your memory index hold answers, or only links to files?
- Did you compare setups on the same questions, on the same day?
Written with help from an AI assistant (Claude). I checked every number against my measurement logs.