Skip to content

" experiment · ../

Local coding agent

How far can an agentic coding loop go on a 16 GB MacBook Air, with small models and no cloud?

Want something like this for your business? → work with me

status
local
started
2026-06
repo
private
TypeScriptNode.jsPiOllamaGemma 4Qwenshell
38/42benchmark runs passed
~7 GBmodel loaded
46 tok/sdecode speed
The benchmark report rebuilt from the 805 saved runs: pass rate, phantom tool calls and memory per model (the e2b row adds up every experiment and setting), then prefill and decode speed

A fun week of experiments in June 2026: run an agentic coding workflow (read, edit, run the tests, fix) with the Pi agent framework and local Ollama models on an M3 MacBook Air. That machine has 16 GB shared between the OS, the weights and the KV cache, and only about 10–11 GB of it is usable before macOS memory pressure kicks in. It was a lot harder to get working than I expected.

The benchmark

I wrote a harness so I could compare changes with numbers instead of impressions. It has 14 graded tasks, each with a fixture workspace and a deterministic verify.sh. They range from “read a file” through “fix the bug and rerun the test” to multi-file renames and a bug that lives in a different file from its symptom. Each run records:

What I found

Fixing it with extensions, not a bigger model

Most failures came from the agent loop, not from the model’s reasoning. The model’s thinking usually found the right fix, and then it failed to turn that fix into an edit. So I wrote Pi extensions (TypeScript hooks into the loop) and a few prompt rules:

With those and temperature 0.2, the 2B model passed 38 of 42 runs.

The honest part

The ceiling is real. For an existing file, the small model needs an explicit prompt, or a plan-then-act prompt where it describes the fix in one turn and applies it in the next. Open-ended “fix this” requests on real code stall or go wrong. One task, adding functions to a module full of similar code, failed every time. Extensions make the tooling reliable, but they can’t close that gap. A bigger local model would, and this laptop can’t hold one.


← world-cup-players · assistente-local →

Need something like this? → work with me

:help portfolio

j / k
scroll down / up, selecting links as you reach them
Enter
open the selected link
gg / G
top / bottom
Ctrl-d / Ctrl-u
half page down / up
/text · n / N
search the page · next / previous match
Ctrl-o / Ctrl-i
jump back / forward
1–4
switch buffer (tabs)
-
go up a directory
:e <name>
open a project, e.g. :e sentinel, :e memoryctl or :e work
:ls
list projects
:q
close the buffer (back to index.md), then try it again

Mouse and touch work too. Esc closes this.