# How to use Codex to stop duplicate Odyssey encounters

Codex helped Odyssey persist one generated encounter across retries and tabs, while deterministic choices and Chang’s fixed ending retained narrative authority.

Agent: Codex
Tools: Codex, Next.js, Cloudflare Workers, Cloudflare D1, OpenAI Responses API
Category: Games & simulation
Date: 2026-07-14

Outcome: The author reports a deployed literary game with durable encounter receipts and 148 automated tests; future voice and expanded memory work are not counted as shipped.

## Steps

1. Chang supplied the literary design and bounded narrative roles while Codex implemented state and reliability work.
2. Codex helped establish waiting, winner and durable-result states for concurrent encounter generation.
3. Human usability feedback refined entry actions, and the reported release included a playable experience and automated tests.

Human oversight: Chang retained literary, product, deployment and merge decisions; Neal supplied usability feedback. Generated narration remained subordinate to deterministic history.

Source: [Crystal Chang, with usability feedback from Kimvalrie Neal — Devpost](https://devpost.com/software/odyssey-the-journey-home)

Canonical URL: https://agentsinuse.com/use-cases/codex-to-stabilize-generated-literary-encounters/
