ClawDOS Writes and Runs Code on an IBM PC 5160: Primes Under 100 in 64 Seconds
ClawDOS is an open-source AI agent that writes, compiles, and runs programs on the IBM PC 5160, an old computer with an 8088 processor running at 4.77 MHz. It completed the task "print the primes below 100" in 64 seconds, 26 of which went to compiling in Turbo C and running the program. The 8088 cannot handle TLS encryption, so a "bridge" running on an ordinary Mac or Windows PC takes over the secure connection. The takeaway: the agent's client needs very little, because the model does all the actual thinking.
AI-processed from Habr AI; edited by Hamidun News
The common assumption is that an AI coding agent needs a powerful laptop, a modern terminal, and a fast internet connection. The ClawDOS project shows the opposite. Developer Rich Acosta, working with Claude, has released an open-source agent that writes, compiles, and runs code on an IBM PC 5160, an obsolete computer with an Intel 8088 processor at 4.77 MHz running DOS. For a simple task, "print the primes below 100," the agent went from pressing Enter to a result on screen in 64 seconds, and 26 of those seconds went to compiling the program in Turbo C and running it.
This is more a hobby experiment than a product, but it clearly shows what an agent is actually made of and how few of its parts are truly "heavy."
What the agent can do on old hardware
Typing CLAWDOS at the command line opens a chat with Claude. The agent reads and edits files on disk, writes programs, compiles them in Turbo C, runs them, and parses what the program prints to the screen. Context persists between sessions, so work can pick up where it left off.
All of this is handled by HARNESS.EXE, a 176 KB program. It builds requests to the Claude Messages API, parses responses, invokes tools, and writes the history of each conversation to disk. In essence it is the same scaffolding around the model that modern agents use, only squeezed down to fit in the memory of an 1980s machine.
The author offers a simple test: ask for "Write PRIMES.C: print the primes below 100, compile with Turbo C, and run it." The agent checks a reference of the installed compilers, writes the source, and then, in a single tool call, compiles, links, and runs the program. The result appears after 64 seconds: 26 go to compilation and execution, and the remaining 38 go to exchanging messages with the API and the model's reply.
A more striking example is that the agent wrote, directly on the PC, a tribute to the 1983 film WarGames: a vector world map, missiles over the pole, a final game of tic-tac-toe, and music for the PC speaker or an AdLib sound card. It consists of five Turbo C files, about 15 KB of source, and an executable under 10 KB.
Where the line between old and new falls
The main constraint is clear: the 8088 cannot handle TLS encryption, which is required to connect to the Claude API at all. So a "bridge" sits between the DOS machine and the internet: an ordinary computer running macOS or Windows with Python 3, which takes over the secure connection. Everything else, from assembling requests to launching the compiler, is done by the PC itself.
There is also a memory trick. When code needs to be built, ClawDOS saves its state and unloads from RAM. Turbo C gets roughly 450 KB of free space, and after the program finishes, the agent returns and holds the result. For modern agents this is a familiar technique: a heavy tool gets all the resources while the orchestrator sleeps.
The author is candid that the screenshots were taken in the 86Box emulator, though requests go to the real API. Acosta also works with a real IBM PC 5160, where a PicoMEM module with an SD card replaces the original 20 MB hard drive. All the code in the repository was written by Claude; the README text alone was written by a human.
What to take from this in practice
First, it illustrates how little an agent's client actually needs. The "intelligent" work happens on the model's side, and locally you need only I/O, tool invocation, and history storage. If you design agents for embedded systems, old industrial machines, or closed networks, this approach is useful: a thin client plus a gateway for encryption.
Second, the project shows the value of the write-compile-verify loop. The agent does not guess whether the code works: it compiles it and reads the output, as modern coding agents do.
Running it requires a computer with Python 3 and an Anthropic key. Without a key, you can run tunnel/mockapi.py and test the interface against an offline API simulation. The project is distributed under GPLv3. HARNESS.EXE uses the mTCP library, also under GPLv3, and the FreeDOS boot sector ships under its own license. Disk images containing Turbo C may not be redistributed.
ClawDOS is not alone in this niche. In November, TINY 2.1 appeared: a tiny language model written in Turbo C that runs under DOS on an old Pentium or 486 and fits on a single floppy disk. Earlier, Benj Edwards demonstrated a local model of roughly 2.2 million parameters for the Super Nintendo. These are demos and novelties, not working tools. But they show that an agent is assembled from simple parts, and those parts can be moved almost anywhere.
- Nov 21, 2026Skein Agent Erases Finished Stages From Context: 97% Success Rate, But More Expensive Than OpenCode
- Nov 21, 2026CoreWeave Owes $47 Billion on Nvidia Chips and Lost $709 Million in One Quarter
- Nov 21, 2026A Developer Had Claude Install 900 Apps and Built a Free Mac Cleaner
- Nov 21, 2026Apple Is Building an AI Agent and Making It Harder for Outsiders to Get Access: Permission Now Takes 14 Steps, Not 4
Key Questions Answered
What the agent can do on old hardware?
Typing CLAWDOS at the command line opens a chat with Claude. The agent reads and edits files on disk, writes programs, compiles them in Turbo C, runs them, and parses what the program prints to the screen. Context persists between sessions, so work can pick up where it left off. All of this is handled by HARNESS.EXE, a 176 KB program. It builds requests to the Claude Messages API, parses responses, invokes tools, and writes the history of each conversation to disk.
Where the line between old and new falls?
The main constraint is clear: the 8088 cannot handle TLS encryption, which is required to connect to the Claude API at all. So a "bridge" sits between the DOS machine and the internet: an ordinary computer running macOS or Windows with Python 3, which takes over the secure connection. Everything else, from assembling requests to launching the compiler, is done by the PC itself. There is also a memory trick. When code needs to be built, ClawDOS saves its state and unloads from RAM.
What to take from this in practice?
First, it illustrates how little an agent's client actually needs. The "intelligent" work happens on the model's side, and locally you need only I/O, tool invocation, and history storage. If you design agents for embedded systems, old industrial machines, or closed networks, this approach is useful: a thin client plus a gateway for encryption. Second, the project shows the value of the write-compile-verify loop.
Test Frontier LLMs & Autonomous Agents in One Workspace
Run Claude Opus 5.5, GPT-6, Gemini 3.1, and DeepSeek side-by-side in Nomad AI (nomadnet.ai) — unified model routing, deep research, and multimodal workflows under one subscription.
The AI world, distilled — once a week
Seven stories that actually mattered, hand-picked. No noise, no reposts, no press releases.
Done! Check your inbox for a confirmation.