I Trained a Tiny Model to Write Every Function in My Coding Agent

Dec 1, 2026

The model that writes the code in one has 30 million parameters. It cannot read English.

That sounds like a bug, so here is the idea. A big model is good at understanding what you want. A small model is cheap and fast, but it cannot understand much. So I split the job. A bigger planner reads the request. The small model only writes one short function at a time, and plain code decides if it is right.

one is open source at github.com/egeuysall/one, and the site is one.egeuysal.com.

How a request goes

You type a request in the terminal. The planner turns it into small functions, each with examples: a call and what it should return.

add a function isEven(n: number): boolean. isEven(4) is true, isEven(7) is false

The small model never sees the English. It sees a function header and the examples. It proposes up to 120 versions of the body. Plain code runs each version against your examples in a sandbox with no network, and the first one that passes wins. You get a diff and say yes or no.

In my test of a request like this, the planner made 2 calls. The whole thing took 7 seconds and 6 of them were the planner. The writer is the quick part. It wrote n % 2 === 0, added ten test cases, and bun test passed.

The examples are the task. If an example is wrong, the code will be wrong, so one tells you to read the examples the planner wrote before you say yes.

What runs where

The code model, the search and the checks run on your machine. The model is a Swift binary, so it needs a Mac with Apple silicon, plus Bun and Docker or OrbStack for the sandbox. There are three sizes: mini (10M parameters), small (30M) and pro (100M).

Only the planner is hosted. It runs on Cloudflare Workers AI, so the text of your request goes to my server and nothing else does. There are daily limits per install so one person cannot run up the bill.

The planner can also run shell commands, like ibx todos add or git status. In bypass mode it runs them. In ask mode it asks first. In plan mode it only writes a PLAN.md.

What I got wrong first

I started by hosting everything, in a Cloudflare container. It was slow, and I did not want to run a server that I would have to keep alive. So the writer moved back to your machine. I deleted the server code.

I also assumed the small model alone could be useful. It cannot. When I call it with only a function header and no examples, it wrote n * 2 ** 3 for a function called double and then got stuck repeating itself. Without examples it has nothing to go on. The planner is what makes it usable.

What still fails

It only writes short functions. Think one to three lines: arithmetic, comparisons, simple string and array work. Harder things, like a leap year check, can fail. When the writer cannot find a version that passes, one says so instead of writing it.

It only runs on a Mac with Apple silicon for now. I wrote a Linux version of the model runner, but I have not shipped it.

Install it

curl -fsSL https://one.egeuysal.com/install.sh | sh

Or brew install egeuysall/one/ai.

I think a coding agent does not need a huge model writing every line. It needs a small model that is cheap to run many times, and a checker that is strict. one is my test of that.

0 views0 comments

Loading comments…