How much can a 27B local model build if the tasks are small enough?

A local 27B model finished all 12 implementation tasks for one feature of a C# desktop app. The feature came to 26 files and about 3,900 added lines, tests included. The suite ended at 140 passing and 0 failing, and the Release build had 0 warnings.

The constraint that made it possible was small: every task packet, meaning everything the model is shown, stays at or under 16,000 tokens, and every task ends in one proof command.

This is not a claim that a 27B model can do the job alone. The worker was qwen3.8:27b, running locally. A Grok bot wrote the spec, and Claude Opus 5.5 ran the orchestrator, the proofs and the final review. That matters, and it gets its own section below.

The constraint

The local model’s context window is 64K (65,536 tokens). I learned earlier that a prompt near the window can be truncated with no error, so I did not want to run near it. The budget for a worker packet is 16,000 tokens: the worker prompt, the task file, every file the task touches, and the whole spec if it still fits. That figure is a cap I chose, not a number I measured. It leaves room in the 64K window for the system prompt, the tool definitions and the reply.

Across the 12 implementation tasks (the board also held a thirteenth, the review), packet sizes ran from 6,978 to 13,258 tokens, with a median of 7,519. The largest was the last implementation task, the only one that edited a large existing file. Every packet came in well under the cap.

What a task file holds

A spec is split into task files. A file marked (new) in the edit list must not exist yet and an unmarked one must, and a task file missing a field is rejected as malformed before any model sees it. An invented, simplified example:

# csv-escaper: Escape quoted fields in CSV export

edit:
  src/Export/CsvEscaper.cs (new)
  tests/Export/CsvEscaperTests.cs (new)
pattern: src/Export/JsonEscaper.cs, class JsonEscaper
packet: at or under 16,000 tokens
depends: csv-header-writer

accept:
  1. A field containing a comma is wrapped in double quotes.
  2. A double quote inside a field is doubled.
  3. Tests set up every value they assert on.

proof: dotnet test --filter CsvEscaperTests

The pattern line is there so the worker does not have to invent a structure.

Four tiers, cheapest first

Tier 0 is a script, no model. Tier 1 is the local 27B model. Tier 2 is a paid mid-tier model. Tier 3 is the strongest model, or the owner. A task starts at the cheapest tier that could plausibly do it and moves up after two failed proofs.

The loop

The orchestrator takes the first unblocked row on a board file in the target repo, measures the packet, starts a fresh worker, then runs the proof itself. Its run is the verdict. The worker’s report is not.

A pass opens a pull request. A first fail gets one retry at the same tier, with the proof output attached. A second fail blocks the task one tier up. Every attempt is logged.

The next task waits until the previous pull request merges, so a dependency is on main before anything builds on it.

What came out

Implementation tasks finished at tier 1 12 of 12
Passed on the first attempt 9 of 12
Tier-1 attempts 17 (12 pass, 5 fail)
Escalations that stuck 0
Wall clock about 30 hours, spread over two days

Turn one: let the worker run its own proof

My first contract was strict. The worker wrote code and handed back without running anything. Only the orchestrator ran the proof, so a failure cost a whole attempt.

Midway through I changed it. On every paid or local tier, the worker gets one tool that runs the proof command and nothing else, with no shell, no network and a 3-run cap. Self-runs do not count as attempts, and the orchestrator’s run is still the verdict.

Attempts Failed
Before (tasks 001 to 003) 7 4
After (004 onward) 10 1

Workers used between one and three self-runs.

The caveat: I credit most of the drop to the self-proof tool. But later tasks may also have been easier, and I was learning what the local tier needs as I went, so the drop is not purely the tool.

Two of the five failures were compile errors. One put ?? between a nullable list and an array, which C# will not accept because both sides need the same type. Another gave a static class an instance constructor. Any developer fixes either in a minute from the first build, but until the self-proof tool existed the worker had file tools only, with no shell and no build. It was writing C# blind and being charged an attempt for each typo.

Nothing was gained by handing back uncompiled code.

Turn two: repair the spec, not the tier

Task 1 went like this:

  1. Attempt 1: compile error (above).
  2. Attempt 2: 2 of 6 tests failed. They asserted values the packet never stated. The model guessed. Two fails blocked the task at tier 2.
  3. Spec repair and reset to tier 1.
  4. Attempt 3 (the first after the reset): 1 test failed, because its expected string had a different whitespace length than the input it had set up a few lines earlier.
  5. Attempt 4: passed.

The tempting reading at step 2 is that the task was too hard for the cheap model. I read both failures instead. Neither said the task was hard. Both said the packet was missing facts.

The repair added the missing values to the packet and one rule: tests assert only values they set up, including exact whitespace and its length. The failed attempts stayed in the log, and the repair itself was not counted as an attempt.

The fifth failure, on a UI task after self-proof, was different. It used all three self-runs and left 1 of 11 tests failing. The code read UI state from a control that is not on screen yet, which always reads false in a test, and the test never puts it on screen. That was a real product bug, not a missing fact. The retry stored the state itself and passed.

A related rule came from a task that consumed an earlier file with nullable warnings. It could not fix them, because that file was not in its edit list. I did not widen the task. The fix became its own one-file task, inserted ahead of the next one, and it passed first try. When a fix falls outside a task’s files, write a new task.

What the review found, and what this does not show

The last task was a review, run at tier 3 by the strongest model, followed by the owner’s sign-off. It re-ran every task’s proof, built and tested in Release, and read the checks tests cannot see.

It passed with one gap: one rule had no test. The code rejected the bad value, but nothing would notice if it stopped. A per-task proof only proves what its tests assert, and the worker writes those tests. The tests that gate tier 1 were written by tier 1, so a rule nobody tested got through every proof.

Three other limits:

What I would do differently

  1. Give the worker its proof command from the first task.
  2. Put the test-setup rule in the task template instead of finding it after a block. It went into one task file after the fact, and it is not in the template yet.
  3. Tighten the cap. The median packet used under half the budget, so 16K can probably come down. I have not tested that, so treat it as a guess.

The short version

A 27B model can build a real feature if every task arrives with the files it touches, a class to copy, the facts it would otherwise guess, and a way to run its own proof. Most of the work was in the spec.

Related posts: what broke when I left the crew running overnight, how far one GPU and a $20 plan go, and diffing the docs against the config.

If you want the next one by email, subscribe. It is irregular, and nothing else gets sent.