An AI coding agent that reads your files, writes programs, compiles them, runs them and checks the output — all from a chat prompt. That describes a lot of modern developer tools. ClawDOS, a hobby project published by a developer using the handle Ricapar, adds one constraint those tools don't have: it runs on an IBM PC XT, on an Intel 8088 at 4.77 MHz, with 640K of RAM and a CGA card. The project shot to the front page of Hacker News this weekend, drawing hundreds of upvotes from developers charmed by the collision of 1980s hardware and a frontier AI API.

Type CLAWDOS at the C:\> prompt, and you can talk to Claude. The agent reads and edits files on the disk, writes programs, compiles them with Turbo C, executes them and inspects what they draw on the screen. It keeps notes between conversations and picks up where it left off — the full agent loop, on a machine that predates the web. For more context on this story, see our ongoing AI industry coverage.

Fitting an Agent Into 640 Kilobytes

The engineering problem is self-evident: a 16-bit 8088 with 640K of memory cannot do TLS, and barely has room for anything else. ClawDOS solves it with a split. The whole agent harness runs natively on the PC as HARNESS.EXE, a 176 KB DOS program that speaks the Claude Messages API directly — it writes the HTTP requests, parses Claude's streamed replies, executes the tool calls, and stores every conversation on the local disk. The one thing the 8088 can't handle, encrypted transport, is delegated to a "bridge" PC that relays traffic.

Memory management is just as hand-rolled. When Claude needs to compile something, the harness can't share the machine with the compiler — there isn't room. Instead, ClawDOS saves its state, exits memory entirely, and lets Turbo C run with roughly 450K free. When the build finishes, the harness reloads and reattaches to the same conversation, now holding the program's output. Every compile is a full stop-the-world event, decades before that phrase meant anything.

From One Sentence to a Running Program

The project's demonstration screens — generated in 86Box against the live API, according to the write-up — show the agent handling genuinely end-to-end tasks. In one, a single message ("Write PRIMES.C: print the primes below 100. Compile it with Turbo C and run it.") results in ClawDOS consulting its own notes about which compilers exist on the machine, writing the source, and compiling, linking and running the program in a single tool call. The answer appears on screen 64 seconds after Enter, 26 of them spent on the compile itself.

More ambitious outputs include a WarGames tribute the agent wrote on the XT itself: a vector world map, missiles arcing over the pole, a tic-tac-toe endgame, and a score that plays through the PC speaker or an AdLib card. The game spans five Turbo C files totaling 15 KB of source, with the compiled WG.EXE coming in under 10 KB — a full game, fitting comfortably in a fraction of what a single modern JavaScript dependency occupies.

Written by Claude, Built by Claude

The human backstory is part of the project's appeal. Ricapar describes the IBM PC as his first computer — his parents' machine, on which he learned to type and write small BASIC number-guessing games. The fully maxed-out IBM PC 5160 is now the centerpiece of his vintage collection, its original 20 MB hard drive disconnected in favor of a PicoMEM that emulates storage from an SD card.

The recursive detail is that the project is itself an artifact of AI coding agents. "I (read: Claude) built this for my own entertainment," the author writes, noting that 100 percent of the repository was written by Claude, with the exception of the human's note. The stated goal was to see how far an AI coding agent could be pushed under constraints far outside the modern norm — and whether "that something it built can then build other somethings." WarGames, written by a program written by a model, on a 1980s machine, is the answer on display.

The full source is public on GitHub under Ricapar/ClawDOS, and the write-up documents the harness architecture, the bridge-PC setup and the demonstration runs.

Why It Resonates

Part of the Hacker News response is pure nostalgia — an agent loop running on the machine many developers first touched. But there is a substantive point underneath. Modern coding agents carry SDKs, runtimes and container images measured in gigabytes; ClawDOS demonstrates that the actual protocol surface between an agent and a model — request formation, streamed parsing, tool execution, persistent notes — fits in 176 KB of DOS code plus one Relay PC for encryption.

It is also a reminder of how lopsided the division of labor has become. The 1988-era machine contributes essentially zero intelligence; it is a terminal, a compiler and a file system. Everything clever happens in the model, reached over a protocol simple enough that a 4.77 MHz processor can speak it by hand. Whether that is an argument for the elegance of the Claude API or a statement about where computing now happens, ClawDOS makes it more memorably than any benchmark chart — and, as one front-page thread's upvote count suggests, a lot of developers noticed.

---

Stay Ahead of AI

Get the latest AI news, analysis, and breakthroughs — all in one place.

Read more AI news →