How Codex plays Factorio: headless Lua state reading plus xdotool GUI control
john_lam · x · 2026-09-11
John Lam shares the full setup behind an agent playing Factorio (via @MiraMira): a Linux VM runs both a headless and a GUI client. The headless one supports Lua scripts for reading game state and planning, while the GUI client records replays and save files, with the agent taking screenshots and interacting via bash('xdotool ...') or Python equivalents. Custom MCP servers existed for distributing work to an agent fleet and managing persistent sessions, but none were needed — stock Codex with no custom MCP servers could do the task.
Related event: John Lam Compares AI Agents' Factorio Progress Over 18 Months(2 posts)→
More from coding & agent
- Git AI Duo Joins OpenAI as Company Pledges to Keep Agent-Tracking Tool Open Source — Dimillian · 2026-09-12
- Tasking an AI agent to buy 4 Tokyo concert tickets: the 'Math Olympiad' of assistants — annbordetsky · 2026-09-12
- AI Agent vs. Customer Support Agent: The Negotiation Future of Codex Computer Use — ethanniser · 2026-09-12
- Sandbox latency compounds into a hidden infra tax in coding-agent RL, Daytona intern finds — tw_killian · 2026-09-12
- Notion AI Meeting Notes now drafts email recaps as users hand follow-ups to agents — ivanhzhao · 2026-09-12
- Agents broke SaaS per-seat pricing: 4,000 lookups overnight, then a 'fair use' email — _Mr_Morningstar · 2026-09-12