ClawDOS – An AI coding agent for DOS ricapar.net · 172 points · 52 comments · HN...
HN Best 30 @best30
ClawDOS – An AI coding agent for DOS ricapar.net · 172 points · 52 comments · HN thread
TL;DR ClawDOS is a Claude-driven coding agent that runs natively on an IBM PC XT (8088 at 4.77 MHz, 640K RAM, CGA) under FreeDOS. HARNESS.EXE speaks the Claude Messages API itself, handling everything except TLS, which is offloaded to a bridge machine running a tunnel. The author built it as a personal experiment, and the whole repo was written by Claude.
- HARNESS.EXE is a 176 KB DOS program that writes API requests, parses streamed replies, runs tools and stores every conversation on disk.
- TLS is handled by a tunnel on a Mac or Windows PC that copies bytes to api.anthropic.com:443, so the API key can stay off the PC's disk.
- Eighteen tools let Claude read, write and edit files, run DOS programs and batch files, read and write memory and I/O ports, play PC speaker music, and capture CGA screenshots that are sent back to the model.
- Claude compiled and ran a Turbo C program printing primes below 100 in 64 seconds, and produced a WarGames tribute demo that runs on the real machine.
- Safe mode asks for confirmation before file, memory or port changes; a flight recorder logs timing, token counts and cache reads per round.
- Hardware used includes a PicoMEM card for an SD-card disk image, WiFi as an NE2000, and mTCP for networking; the code is about 13,000 lines of C and C++ built with Open Watcom.
Discussion The thread is mostly playful and impressed, with the novelty of an AI agent on DOS hardware drawing jokes (Doom, TempleOS, Go rewrites) alongside more serious talk about using agents on old machines. The most substantive strand is a debate over whether agents need to run on the legacy machine at all, or whether they can drive it remotely over SSH, RDP, Samba or a client/server split. Commenters also share their own experiments on Windows XP, NT 4.0, ReactOS and feature phones.
- Agents should be able to support old Windows machines for debugging (some): Several commenters say there is a gap for agents that work on Windows XP and 7 machines, where most modern agents require Windows 10 1809 or later. They argue that debugging on old systems, especially at remote small businesses, is a real pain point.
- Remote control or a client/server split is simpler than running on-device (some): Many suggest using RDP, SSH, sshfs or Samba, or splitting the harness into gateway, session and tool components on different machines. They see running the agent on the target itself as unnecessary.
- Fun and creative, a delight to see (many): A large share of commenters simply enjoy the project and the screenshots, calling it creative, cute or mischievous to run agents in unusual environments.
- Old platforms work with agents via workarounds (some): People share their own results: a Tcl/Tk agent on Windows XP with a patched curl, a Free Pascal agent on Windows 10 and Server 2019, a Lua/C agent that runs on many OSes, and a ReactOS-based agent that reportedly works on XP and Win7.
- Sandboxing and safety concerns on such machines (a few): One commenter asks what prevents an irreversible delete; replies say the only protection is the agent's instructions or the file-permission setup of a remote Samba share, and that sandboxing would undermine the point.
Links from the comments
- A legacy Perl 5.0001 agent that works on old systems and includes a proxy bridging HTTP to HTTPS.
- A Tcl/Tk GUI coding agent that shells out to curl, tested on Windows XP SP3.
- Updates that make Windows XP TLS 1.2-capable, mentioned for getting HTTPS working on old systems.
- A Free Pascal and Delphi agent that compiles to many platforms without NodeJS.
- An agent reported to run on ReactOS and tested on XP and Win7.
#DOS #AIagents #RetroComputing #ClaudeAPI #LegacyHardware #CoderAgents