DeepSeek Harness (Part 3)
Neil Haddley โข October 16, 2026
A hosted DeepSeek V4 Pro model builds Space Invaders and hands 15 small functions to qwen3-coder:30b subagents running on my Mac: every piece written locally, a playable game in 25 minutes for $0.40, and the two limits I found along the way
Can a model running free on my own Mac do some of the work, while a hosted model does the thinking? The DeepLearning.AI course AI Coding Workflows: From Cloud to Local shows how: a large model plans the work and hands pieces of it to subagents running a smaller model. In this post I tried that pattern in DeepSeek Harness, building the same Space Invaders game as in part 1 and part 2.
The short answer: it works, provided the pieces are small and written down exactly.
The idea
The hosted model, DeepSeek V4 Pro, builds the game. For each small function whose behaviour it can pin down completely, it writes only three things:
- the signature, with a comment that states exactly what the function does, including the formula and the units;
- a body that throws
TODO; - tests for it.
Then it hands each TODO to a subagent running qwen3-coder:30b on my Mac through Ollama. The subagent fills in the body and runs the tests until they pass. The hosted model checks the result itself before it moves on.
Setting it up
In DeepSeek Harness I opened Plugins, then Subagent, switched on "Allow agents to choose models for Subagents", and ticked only qwen3-coder:30b. With only the local model allowed, the planner cannot send a piece to a hosted model by mistake.
I gave DeepSeek V4 Pro the same short PRD and PDD as in part 1, and this prompt:
PROMPT
1Read PRD.md and PDD.md. Build the game described in them in this folder. 2 3First write your own step-by-step plan in ARCHITECTURE.md. Before you write any number into the plan, make sure the numbers agree with each other. For example, the cannon must stand on the ground line, not below it. 4 5Build the game yourself, with one exception: small, fully specified pieces of logic go to a local model. For each pure function or short class method (under about 25 lines) whose behaviour you can pin down completely, and that does not call any other such piece, write only: 6- its signature, with a doc comment that states exactly what it does, including any formula, units and edge cases; 7- the body: throw new Error('TODO'); 8- tests for it in tests/*.test.js, using node:test with top-level test(...) calls. 9Aim for 10 to 20 such pieces. Write everything else yourself, including everything the player sees on screen. Also write CONVENTIONS.md (units, naming, how objects are removed, where constants live). 10 11Then hand each TODO piece to the local model, one at a time: use the subagent tool with provider "ollama" and model "qwen3-coder:30b". Give it a short packet: the file, the piece's name, CONVENTIONS.md, and the piece's tests. Tell it to replace only that body, run that piece's tests, and fix its code until they pass, without editing any test. Wait for each subagent to finish before starting the next. After each one, run the tests yourself; if a piece still fails after two subagents, write it yourself and note it. 12 13When everything is done, run all the tests; they must all pass. Then open the game in headless Chrome, take a screenshot of the canvas after pressing Space, and check it by reading the canvas pixels: the cannon, shields, aliens and floor must all be drawn, and nothing may overlap or sit in the wrong place. Fix what you find. 14 15At the end, report which pieces the local model wrote, which you wrote, the test results, and what the screenshot showed.
What a piece looks like
The planner picked 15 pieces, wrote a test file for each, and checked that every test failed with TODO before it handed anything over.
Here is one piece. The planner wrote the comment and the tests; qwen wrote the single line in the body:
JS
1/** 2 * Horizontal speed of the alien swarm in px/s. 3 * Formula: min(ALIEN_SPEED_X_MAX, ALIEN_SPEED_X_BASE * sqrt(totalCount / aliveCount)). 4 * Both counts must be >= 1 (the engine never calls this with no aliens). 5 */ 6export function alienSpeed(aliveCount, totalCount) { 7 return Math.min(ALIEN_SPEED_X_MAX, ALIEN_SPEED_X_BASE * Math.sqrt(totalCount / aliveCount)); 8}
JS
1test('full grid speed is the base 60 px/s', () => { 2 strictEqual(alienSpeed(50, 50), 60); 3}); 4 5test('a single alien caps at the max 300 px/s', () => { 6 strictEqual(alienSpeed(1, 50), 300); 7});
The result
All 15 pieces were written by qwen on my Mac. Each subagent read the file, edited the body and ran its test, usually in 25 to 70 seconds.
Three times, a subagent finished in two seconds having done nothing: qwen wrote its request to read a file as plain text instead of as a real tool call, and the harness took that text as its final answer. Each time, the planner ran the test, saw the TODO still there, and started the piece again. The retry worked every time.
| Time | 25 minutes |
| DeepSeek cost | $0.40 |
| Pieces written by qwen | 15 of 15 (18 subagents, 3 of them retries) |
| Tests | 48, all passing |
And the game plays: the aliens march, both sides shoot, the shields chip, and the cannon respawns when it is hit.
โถ Play it: Enter to start, the arrow keys or A and D to move, Space to fire.
Did the local model save money?
No. The hosted model alone built the same game in 14 minutes for $0.37, so the bill came out about the same.
The reason is simple. To hand over a small function, the hosted model still has to describe it exactly and write its tests, and for a small function that takes about as many words as writing the code. The local model saves money only when the code it writes is much longer than its description.
What I learned
The course's pattern works with a local model, as long as each piece is small and the hosted model writes down exactly what it must do. Write the formula in the comment, write the tests first, and have the planner check every piece itself.
Expect a local model to write small, exactly described pieces correctly, as long as the hosted model writes each piece's comment and tests first and checks every result. On this project, it did not make the build any cheaper.






