Back Original

Creating a Coding Agent With a Coding Agent

Yesterday in the morning I created a new AI coding agent, using an existing AI coding agent. It took me an hour, and it worked. This was sort of like creating a mini Claude Code using the existing Claude Code. I still can’t believe it worked. I want to write down why and how I did this.

The problem - an old laptop

My first laptop was a 2012 MacBook Pro, and it still works. I have been using AI coding agents for more than a year, and in the last six months, Claude Code has become wildly popular. People are using it almost like the first thing you open up on your computer. So I thought it was natural that I should install it on my old laptop as well.

To my surprise - it didn’t work. Claude Code does not work on MacOS 10. I tried two other competitors - AdaL and OpenCode. Even they didn’t work.

Digging deeper

I had to dig further to find out the real reason - Bun does not work on MacOS 10. And most of these tools are based on Bun. Since node.js works fine on MacOS 10, I tried to build OpenCode using node.js - but I could not. The dependency is deep.

Then I tried to build bun on MacOS 10. It seems you need to have bun on a system in order to build bun. That was a nice recursive definition which works for things like gcc which are, indeed, present on all Mac and Linux machines. Bun is not.

Dreaming of a solution

Over the years I have found Rust to be an excellent choice for distributing programs which work everywhere. I have even built desktop apps in Rust which work on my ancient MacOS 10. I think Rust or C should be the language for building a command-line AI agent. Because both Rust and C work everywhere there is a terminal.

The first AI coding agent I tried was an IDE called Windsurf. Eventually I got the taste of Claude Code and started using it more and more. In the last eight months, I saw two competitors come out with good alternatives to Claude Code - and they had pretty small teams. I also watched a video which had a hypothetical explanation of how Claude Code worked internally. Based on these observations I decided that it can’t be that hard to create an AI coding agent in Rust.

Building the thing

I chose AdaL as my AI coding agent. In the last couple of months I have seen it is as good as Claude Code, and even better in some aspects. I cloned the OpenCode repo and asked it to generate a detailed architecture description of the product:

study how this software works and prepare a detailed implementation spec, to be used by humans or AI agents

Here is what it came up with - a detailed description with 14 sections.

Then I created a new directory and from inside of it I asked

create an interactive coding agent in Rust which only works on the command-line. 
refer to the IMPLEMENTATION_SPEC.md document and select the parts which you need to implement. 
make sure the agent can handle OpenAI and Anthropic LLM APIs

It took maybe 5 or 10 minutes to write the code, build it, fix it and build it again. I wasn’t really watching all the time - in fact I went away from my desk and came back. And then it was done. Around 1500 lines of working Rust code.

Running it on my old laptop

Rust has great cross-compilation support. I built the coding agent on my Mac Mini, zipped it up and transferred it to the old laptop. And it worked! These days even screenshots can be faked, so I am not attaching one here. And terminals are terrible to watch - they are great to use.

The code

I was in a bit of a dilemma about the code - should I put it on GitHub? I didn’t write it anyways. Wasn’t I polluting the original purpose of GitHub - I couldn’t decide. In the end I created a public repo and pushed the code. I added a rider at the top of the README:

Note: This project was entirely generated by a coding agent

What next

I want to see if this really works on all low-end platforms and old machines. I might not do much with the actual code itself, because building a production-quality coding agent is more work than I want to take on now. Besides, GitHub is flooded with coding agents - mine is a drop in the ocean. My example proves that if a coding agent is not available on a machine and you know it will make life easier for you, you can build one in an hour. I am happy with that.