AgentOdyssey: Open-Ended Long-Horizon Text Game Generation for Test-Time Continual Learning Agents

Zheyuan Zhang, Zehao Wen, Alvin Zhang, Andrew Wang, Jianwen Xie, Daniel Khashabi, Tianmin ShuNeurIPS 2026

TL;DR

Most AI benchmarks treat models like students taking a final exam: training stops, pencils go down, and static testing begins. AgentOdyssey flips this script by dropping LLM agents into procedurally generated, hundreds-of-steps-long text RPGs where they must continuously learn new world rules, remember where they left their keys, and plan on the fly. The verdict? Stuffing everything into a massive context window works best for now (at an astronomical token cost), while updating model weights on the fly improves task progress—right up until the agent starts forgetting how to answer basic questions.

What Problem Does This Paper Address?

Imagine waking up in an unfamiliar world where monsters hit harder at midnight and crafting recipes vanish unless you physically write them down on in-game paper. Humans handle this naturally: we explore, take notes, remember past mistakes, and adapt continuously.

Traditional AI benchmarks miss this entirely. They assume a hard wall between training and deployment, evaluating frozen models on short, resettable episodes. Worse, static games (like NetHack or classic text adventures) have likely leaked into modern LLM pretraining data. To evaluate test-time continual learning—where learning and acting are interleaved over a lifetime without resets—we need environments with genuinely novel rules and long horizons, stripped of visual perception distractions so we can isolate pure reasoning and memory.

Figure 1: Example player trajectory in an AGENTODYSSEY-generated game. AGENTODYSSEY games test five key abilities for test-time continual learning agents: exploration for finding the workbench, episodic memory for recalling the dropped trade item, world knowledge acquisition for avoiding dangerous travel times, skill learning for improving crafting via written recipes, and long-horizon planning for completing multi-step objectives such as crafting a key for trade. The trajectory shows these abilities working together over hundreds of steps to complete the quest.

Methods

The authors built two main components: a procedural game engine and a diagnostic evaluation suite.

  • Ontology-Grounded Program Synthesis: Rather than asking an LLM to hallucinate a game end-to-end, AgentOdyssey uses LLMs (via Aider) to synthesize Python code on top of a structured RPG ontology (locations, objects, NPCs, quests). Crucially, world dynamics split into player-triggered action rules and environment-driven step rules (like 10-minute clock ticks, day-night cycles, or patrolling enemies). An automated loop runs random/LLM agents through generated code to catch and repair runtime bugs.
Figure 2: AGENTODYSSEY game engine and generation pipeline. At each step t, an agent observes a partial view of the world state as text, and makes a decision (i.e., an action). Action and step rules jointly update the world state from t to t + 1, and the agent receives rewards based on main quest progress and supplementary metrics, including side quest progress, exploration, crafting, and defeat. The left shows the game engine, and the right shows the entity, dynamics, and quest generators, each of which can access and modify other game elements.
  • Diagnostic Probing Beyond Rewards: Game score alone doesn't tell you why an agent got stuck. Alongside quest and exploration rewards, the authors probe agents with automatically generated multiple-choice World Knowledge QA (testing learned semantic rules before and after play) and Episodic Memory QA (testing recall of the agent's own trajectory), plus action diversity (entropy) and token cost.
  • Agent Paradigms Tested: Using standard ReAct prompting across proprietary (GPT-5, Claude-Opus-4.6) and open-weight (Qwen-3, LLaMA-3) backbones, they compare non-parametric memory—Long Context (append everything), Fixed-Size/Short-Term Memory (STM), and RAG (external vector DBs)—against parametric test-time training via LoRA Supervised Fine-Tuning (SFT), RL, and latent memory tokens.

Datasets

Instead of static datasets, AgentOdyssey procedurally generates new benchmark environments—filtering out any game where a pretrained LLM scores too high on World Knowledge QA before playing. The authors evaluate agents across six generated games (Remnant, Mark, Metropolis, Saltglass, Quarantine, and Robot Kingdom). Remnant serves as the flagship gauntlet (18 areas, 83 object types, 24 main quest stages), while Mark offers a streamlined 17-stage questline tailored for smaller 4B-parameter models.

Key Insights and Ideas

  • Context is king, until the bill arrives: Appending the entire history to the prompt (Long Context) beats RAG and sliding-window memory because nothing gets lost in retrieval bottlenecks. However, its cumulative token cost grows quadratically with steps, putting a hard economic ceiling on an agent's "meaningful horizon."
Cumulative token costs skyrocket quadratically for Long Context agents compared to RAG, STM, and SFT.
  • The Parametric Paradox (Catastrophic Forgetting in Action): Updating LoRA weights at test time (SFT) paired with a short-term memory buffer acts like a neat cognitive split: STM handles immediate working memory while weight updates consolidate long-term intuition. Yet, SFT agents actually score worse on World Knowledge QA after playing than before! Fine-tuning on raw trajectories degrades general language/QA capability—a textbook case of catastrophic forgetting hidden beneath rising quest scores.
World Knowledge QA accuracy improves after gameplay for context-based agents, but drops for SFT.
  • Reasoning models don't need explicit "Reflection" steps: Adding explicit reflection or summarization modules didn't help modern reasoning models, likely because they already summarize and reflect implicitly inside their reasoning traces.
  • Nobody takes notes: Despite having pens and paper in-game to record disappearing recipes, zero evaluated agents learned auxiliary note-taking skills.

Key Results

  • Across all 6 games (500-step budget): Long Context (GPT-5) led with 47.7% mean main-quest completion, beating RAG+STM (30.0%), Fixed-Size STM (24.1%), and SFT+STM with Qwen3-4B (19.3%).
  • Humans still dominate complex horizons: On the demanding Remnant game, Long Context (GPT-5) completed 3/24 quest stages (while boosting its World Knowledge QA from 36.5% to 71.3% and hitting 92% on Episodic QA). Even Claude-Opus-4.6 lagged far behind human players, who reached 9/24 quests in 500 steps.
  • Cost gap: Outside Remnant, Long Context averaged 51.6k tokens/step, compared to a lean 2.5k–3.4k tokens/step for RAG, STM, and SFT.
  • Test-time training on smaller models (Mark): With Qwen3-4B, Long Context collapsed into repeating a single action (0/17 quests), whereas SFT+STM led the pack at 7/17 quests—despite its World Knowledge QA dropping by 5.5% post-training. (By contrast, GPT-5 Long Context cleared all 17/17 stages in 192 steps).

Limitations and Future Work

AgentOdyssey is strictly text-based, single-agent, and turn-based (every action advances the clock by a fixed 10 minutes). While this cleanly isolates memory and planning, it sidesteps visual grounding, physical control, and messy real-time or multi-agent dynamics. Moving forward, the authors envision extending the generator to multi-agent worlds with visual rendering and richer temporal mechanics—and challenge the community to build test-time training algorithms that balance plasticity (learning new rules) with stability (not forgetting how to read).

Summary updated

Abstract

For agents to learn continuously from interaction with the world at test time, they must be able to explore effectively, acquire new world knowledge and skills, retain relevant episodic experiences, and plan over long horizons. To evaluate these key abilities of test-time continual learning agents, we introduce AgentOdyssey, a novel evaluation framework that procedurally generates open-ended text games with rich entities, world dynamics, and long-horizon tasks. Critically, AgentOdyssey goes beyond the conventional machine learning assumption that learning does not occur at test time by placing agents in a continuous, long-horizon setting that interleaves learning and inference throughout deployment. We further propose a multifaceted evaluation methodology that measures not only game progress but also offers diagnostic tests on world knowledge acquisition, episodic memory, object and action exploration, action diversity, and model cost. We evaluate diverse agent paradigms across six generated games. Our experimental results reveal critical limits in agents' key abilities, as well as factors that influence their meaningful horizon. Although performance scales with stronger base models, even the top agent remains far below human performance on a demanding long-horizon game, leaving substantial headroom for improvement. Additionally, a focused study of agent test-time training finds that, although short-term memory is beneficial, agents trained with supervised fine-tuning still suffer from catastrophic forgetting, suggesting that effective parametric continual learning remains an open challenge for test-time agents.
BibTeX
@inproceedings{zhang2026agentodyssey,
  author = {Zheyuan Zhang and Zehao Wen and Alvin Zhang and Andrew Wang and Jianwen Xie and Daniel Khashabi and Tianmin Shu},
  title = {{AgentOdyssey: Open-Ended Long-Horizon Text Game Generation for Test-Time Continual Learning Agents}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=uNezciDNHb},
}
Figure