ClawDOS is an AI coding agent that runs natively on an IBM PC XT (8088 at 4.77 MHz, 640K RAM, CGA) under FreeDOS 1.4, using the Claude Messages API to write, compile, and execute programs on vintage hardware. The core harness, HARNESS.EXE (176 KB, 13,000 lines of C/C++ built with Open Watcom), implements the agent loop: it streams API requests via mTCP over a packet driver, parses SSE/JSON responses, executes 18 tools (file I/O, search, DOS program execution, memory/port peeks, screenshots, PC speaker music, and persistent memory notes), and renders a hardware-scrolled, retrace-synced chat UI in CP437. TLS is offloaded to a bridge machine running a Python tunnel (tunnel/tunnel.py) that proxies plain HTTP to api.anthropic.com:443, keeping the API key off the XT. Turbo C 2.0 compiles code with ~450K free when the harness yields memory; a prime sieve demo compiled, linked, and ran in 26 seconds (64 seconds end-to-end). The agent built a WarGames tribute demo (15 KB source, 5 files, WG.EXE <10 KB) featuring CGA palette tricks, vector graphics, and AdLib/PC speaker audio, and can recall it from disk memories (C:\MEMORY) across sessions. Screenshots are captured via timer-interrupt video memory copies, PNG-encoded on the 8088, and sent as images. Conversations persist as API-format files; F-keys control safe mode, memory browsing, model switching, and thinking effort. The bootable disk image (CLAWDOS.IMG) includes TINYASM, WASM, Bruce's C, GW-BASIC, lDebug, and Turbo C (user-supplied). Tested via 31 DOSBox-X boot tests against a mock API and on 86Box's 8088 emulation. Licensed GPLv3.
Read original
hackernews