Dev built an RTS for AI agents with Claude Code — and made Claude Code play it

emersoftware · reddit · 2026-10-14

A developer used Claude Code and Codex to build "Age of Agents", a simplified RTS for AI agents (think StarCraft, much simpler), and Claude Code can play it too.

How it was built: given the game rules, Claude Code implemented a deterministic simulation, JavaScript sandbox, HTTP server and CLI/MCP connectors, ran full agent matches and verified replays reproduce identically. It later rebuilt the viewer with timeline markers, keyboard shortcuts, share URLs and a mobile-friendly layout.

Key lesson: concrete checkable goals ("a replay must reproduce the match", "switching tabs must not resize the layout") beat vague asks like "make it look better".

Gameplay: Claude Code connects via CLI/MCP, reads the battlefield as text, issues orders and writes JS scripts for its units that keep running while it thinks; speed is part of the game. The public replay site is free without signup.

Related event: Dev Builds Age of Agents, an RTS Where AI Agents Battle Each Other(3 posts)→

Original post →

More from coding & agent

coding & agent channel →