Can a 32 GB Mac Run a Local Coding Agent? Codex and Cline, Measured

We gave Codex CLI and Cline two real Python tasks each on a 32 GB Mac mini, with a 27B model running locally. All four passed. Here is how long they took, where the time went and what to set up.

Yes. On a 32 GB Mac mini (M2 Pro), Codex CLI and Cline completed 4 of 4 real coding tasks with qwen3.8-27b-4bit running locally through Rapid-MLX. A task took 2.5 to 6.5 minutes, and peak GPU memory stayed at 23.5 GB. The first request on a fresh server is the slow part, about one to one and a half minutes. After that, the median step took 18 seconds.

The result

Two tasks on the same small Python package (an inventory store with bugs), run once per agent in a fresh copy of the repo:

Agent Task Result Wall time Model requests Peak GPU memory
Codex CLI 0.169.1 A · fix tests 3/3 tests pass 160 s 4 23.4 GB
Cline CLI 3.0.74 A · fix tests 3/3 tests pass 246 s 8 19.3 GB
Codex CLI 0.169.1 B · add features 11/11 own tests, 4/4 hidden 394 s 14 23.5 GB
Cline CLI 3.0.74 B · add features 8/8 own tests, 4/4 hidden 259 s 8 23.5 GB

Setup: Mac mini, M2 Pro, 32 GB, macOS. rapid-mlx 1.0.4, model qwen3.8-27b-4bit (the engine's pick for 32 GB), default settings, no flags. One run per agent and task, measured on 2026-11-17. Request counts and memory come from the server log; GPU memory is the Metal peak the server reports.

Where the time goes

A coding agent sends a long system prompt with its tool definitions before your task even starts: 3,400 tokens for Cline and 5,400 for Codex in these runs. The model has to read all of it before it writes the first word.

What happens Measured on M2 Pro 32 GB
Time to first token, first request on a fresh server 56 s for 3,406 tokens (Cline), 90 s for 5,436 tokens (Codex): about 60 prompt tokens/s
Whole first request 64 s (Cline), 96 s (Codex)
Later requests, prompt already cached (31 requests) median 18 s; half took 14–38 s; range 8–73 s
Writing output (decode), cached requests about 9–10 tokens/s

The later requests are fast because Rapid-MLX keeps the prompt it has already read in its prefix cache. Each new request only processes the part that changed. In Codex task A, the second request was 6,042 tokens long, but only 634 of them were new. The longest follow-ups (52–73 s) were the steps where the agent wrote 530–730 tokens of new code. Task B's first Codex request took only 31 s because it ran on the same server right after task A, so the system prompt was already cached.

Keep rapid-mlx serve running between tasks. Restarting the server empties the prefix cache, and the next request pays the full prompt-reading cost again.

1 · Install Rapid-MLX and an agent

curl -fsSL https://rapidmlx.com/install.sh | bash
npm install -g @openai/codex   # or: npm install -g cline

2 · Serve the 27B model

rapid-mlx serve qwen3.8-27b-4bit

The first run downloads the weights. On a 32 GB Mac, close other memory-heavy apps; the model plus an agent session peaked at 23.5 GB of GPU memory in our runs.

3 · Point the agent at it

For Codex CLI:

rapid-mlx agents codex --setup

For Cline CLI:

cline auth -p openai -b http://localhost:8000/v1 -k not-needed -m qwen3.8-27b-4bit

In the Cline VS Code extension, choose OpenAI Compatible and enter the same base URL, any key and the model name. Full details are in the Codex guide and the Cline guide.

4 · Give it a task

# inside your project folder
codex "The tests in tests/test_store.py are failing. Fix the code, not the tests. Verify with python -m pytest -q"

Ask for a check the agent can run, like a test command. In our runs, both agents read the code, edited it, ran pytest and only finished once the tests passed.

What to expect day to day

Frequently asked questions

Is 32 GB enough RAM for a local coding agent on a Mac?

Yes, for a 27B model. In our runs, Codex CLI and Cline on qwen3.8-27b-4bit passed all four tasks on a 32 GB M2 Pro, peaking at 23.5 GB of GPU memory. With 16 GB, use a smaller model such as qwen3.5-9b-4bit; we haven't run these two tasks on it.

Why is the first request so slow?

The agent sends 3,400–5,400 tokens of instructions and tool definitions first. On an M2 Pro, the first token arrived after 56–90 seconds, about 60 prompt tokens per second for a 27B model. Later requests reuse the cached prompt: the median took 18 seconds.

Which is faster locally, Codex CLI or Cline?

It depends on the task. Cline sends a shorter system prompt, so its first request was faster (64 s vs 96 s). On the bug-fix task Codex finished sooner overall (160 s vs 246 s), and on the feature task Cline did (259 s vs 394 s). Both passed everything.

Will a newer Mac be faster?

Prompt reading scales with GPU compute, so M4 Pro, M5 and Max chips cut the first-request wait. See local AI speed across M2 Pro, M4 Pro, M5 Max and M3 Ultra for measured numbers.

Where to go next


Run this yourself. Rapid-MLX is an open-source, OpenAI- and Anthropic-compatible inference server for Apple Silicon. One command installs it, then rapid-mlx serve <alias> serves any model on localhost:8000/v1.
curl -fsSL https://rapidmlx.com/install.sh | bash

New models and speedups, in your inbox

A short note whenever Rapid-MLX gets faster or adds models worth running on your Mac. No spam — unsubscribe anytime.