What it is

Codex 2040 is a high-strategy, educational simulation about the race to deploy increasingly capable AI.

Long-form AI futures such as AI 2027 and AI 2040 ask readers to hold capability growth, public access, safety, regulation, trust, organizational capacity, and market concentration in their heads at once. Codex 2040 turns those coupled systems into a playable world.

You play as the CEO of OpenAI. Your goal is not simply to maximize users or win a monopoly. You must expand useful AI access while preserving safety, governance, public trust, and a healthy competitive ecosystem through 2040.

How it works

The game runs on a deterministic TypeScript simulation engine with a polished world-map control-room interface.

  • Invest limited Compute in Model, Product, Company, and Open Ecosystem strategy trees.
  • Expand AI access across eight world regions.
  • React to 100 authored world events spanning policy, disasters, culture, competition, and technology.
  • Watch autonomous rivals invest, improve, and take market share while you wait.
  • Make pivotal choices in 2029 and 2035 that change the route to 2040.
  • Balance capability against safety and governance gaps.
  • Trade away market share through an open ecosystem when concentration threatens trust.
  • Reach one of eight endings, from Beneficial Abundance to Regulatory Freeze, Misalignment, or Pyrrhic Monopoly.

Critical events pause time and explain their cause, Trust effect, and most urgent game-over risk. The ending screen compares the reference scenarios with the player's own timeline rather than presenting any scenario as a prediction.

Codex-native experience

Codex 2040 was designed to be played inside the Codex app. The simulation runs in the in-app browser while a read-only Codex Advisor helps the player understand the next decision and its tradeoffs. The player remains the only operator: the Advisor never clicks, injects events, or mutates the save.

The project also includes TIBO — Voice Operator, built with the official OpenAI Agents SDK, RealtimeAgent, RealtimeSession, gpt-realtime-2.1, and browser WebRTC. TIBO can perform one carefully bounded action: resetting the in-game Tibo token cooldown. The agent asks for explicit spoken confirmation, then uses an approval-gated function tool. It cannot change an OpenAI account, billing, API limits, or permissions.

The hosted OpenAI Sites build uses a clearly labeled scripted fallback because standard API keys are never shipped to the browser. The live Realtime Voice Agent is demonstrated from the local trusted-server build.

How we used Codex and GPT-5.6

Codex was both the build environment and engineering collaborator. We used it to:

  • refine the learning thesis and establish a strict engine/Advisor authority boundary;
  • translate the specification into a deterministic TypeScript state machine;
  • build the map, strategy trees, autonomous competition, 100-event catalog, scenario decisions, voice flow, bilingual UI, save system, and ending review;
  • run parallel research, implementation, balance, localization, code-review, and E2E lanes;
  • generate and improve adversarial tests for replay, state bounds, scheduling, retries, branches, and endings;
  • audit every public claim against the code and exact hosted artifact.

GPT-5.6 was used throughout the core build to reason across the specification, implementation, UI, tests, and documentation—not only for initial brainstorming.

Educational grounding

Codex 2040 is an independent educational adaptation inspired by AI 2027 and AI 2040: Plan A from the AI Futures Project. It simplifies and recombines their dynamics into game mechanics, links players back to the source material, and does not present either scenario as a prediction or reproduce the original works.

The design takes inspiration from the way serious strategy simulations can make complex real-world systems learnable through interaction. Its thesis is simple: maximizing one number is not the same as creating a good future.

Try it

Open the public build and choose Japanese or English. No account is required. A first-run mission screen explains who you are, what you control, and what can end the game. Returning sessions resume from browser autosave.

Built With

Share this project:

Updates