Sunday, July 12, 2026
AI Agents Beat Slay the Spire 2 — Not With a Better Model, But With Smarter Memory
Posted by

AI Agents Beat Slay the Spire 2 — Not With a Better Model, But With Smarter Memory
Slay the Spire 2 is a brutal deck-building roguelite. Hundreds of decisions per run. High randomness. Cards that combo in ways you didn't plan for. Humans win about 16% of runs at the lowest difficulty.
AI agents? Zero wins. Across every frontier model tested in the AGI-Eval benchmark. Not a single victory.
That changed last week. Researchers from Alaya Lab, Shanghai Jiao Tong University, and collaborators published AgenticSTS — and their agent won 6 out of 10 runs. Not by swapping in a smarter model, but by fixing how the agent remembers.
The culprit they identified is something every agent developer has felt but never named: context rot.
What Is Context Rot?
Every agent framework I've used — ReAct, Reflexion, LangGraph — works by appending. Each turn, the agent's action, the tool's response, and any reflection gets pushed onto an ever-growing chat log. The next decision sees everything that came before.
This works fine for 5-turn interactions. For 50-turn game sessions or multi-hour coding sessions? It's a disaster.
The researchers measured competitors using this pattern — agents like STS2MCP and CharTyr (state-of-the-art public agents running on Gemini 3.1 Pro). Their prompts grew from a few thousand tokens to up to 527,000 tokens over a session. The agent spent 96% of its time waiting for the model to process an increasingly noisy context. Accuracy degraded as older but crucial information got buried under recent chatter.
Context rot is what happens when that growing transcript dilutes signal. Early decisions, strategic reasoning, and past mistakes are still technically in the prompt — but the model's attention has shifted to whatever just happened. The agent repeats errors, forgets its plan, and eventually stalls.
It's the same problem your coding agent has when it forgets what file structure it was building halfway through a 200-step task. You've felt this. Everyone has.
The Five-Layer Fix
AgenticSTS doesn't append anything. For every decision, it builds a fresh prompt from a structured catalog of five explicit memory layers:
L1 — Protocol. Fixed instructions that define the agent's core behavior. Never grows.
L2 — State Schema. The valid actions available right now. Parsed from the game state, not accumulated.
L3 — Game Rules. Retrieved rule documents. Pulled on demand, not carried from turn to turn.
L4 — Episodic Memory. Summaries of previous runs — what worked, what didn't, what the last successful strategy looked like. This is the memory that crosses run boundaries.
L5 — Skill Library. Stored tactical strategies triggered for specific situations. Think "when you see this enemy pattern, try this card combo."
The critical design choice: no raw cross-decision transcript is ever appended. Each prompt is assembled fresh from these layers, using typed retrieval to pull exactly what's relevant. The prompt stays bounded — roughly 5,000 tokens — for a session of any length.
This isn't just elegant. It's a fundamentally different philosophy of agent memory. Instead of "keep everything and hope the model figures it out," AgenticSTS says: "decide in advance what the agent needs to see, structure it, and retrieve it deliberately."
The Numbers Are Stark
The comparison with accumulating-context agents is brutal:
| Metric | AgenticSTS | Accumulating-Context Agents |
|---|---|---|
| Prompt size | ~5,000 tokens (constant) | Up to ~527,000 tokens (growing) |
| Token efficiency | 1x baseline | 66x – 90x more tokens per point scored |
| Speed | Baseline | 4x slower (96% of loss is model latency) |
| Win rate (A0) | 60% (6/10) | 0% (0/5) |
The authors note the comparison isn't a perfect ablation — routing strategies differ across agents — but the direction is clear. These competitors aren't outliers; they're the current state of the art.
The ablation within AgenticSTS tells the real story. With just the no-store baseline (L1-L3 only, no skill library or episodic memory), the agent still won 3 out of 10 runs — beating every frontier model. Adding the skill library (L5) doubled the win rate to 6 out of 10. With episodic memory (L4) active, the agent climbed to difficulty levels A6–A8 in the game's ascension system. Without it, it stalled at A2–A4.
Each layer earns its keep.
Model-Specific Memory: The Transfer Problem
One of the paper's most surprising findings: memory doesn't transfer between models.
The team froze a memory stack built by Gemini 3.1 Pro and passed it to other agents. Qwen 3.6-27B got an 84.5% score boost but still couldn't win. Deepseek V4-Pro actually scored 18.1% worse with the borrowed memory.
This means that "train a thinking model, feed it a chat log, and watch it work" isn't a strategy. Memory architecture and model capability are coupled. The way a model uses its context — how it attends, what it prioritizes, how it navigates structured vs. unstructured input — determines what memory shapes are useful. You can't build one memory system and swap models underneath it without retuning.
This Is Part of a Bigger Shift
AgenticSTS didn't appear in a vacuum. The "context rot" problem is getting serious attention across the industry:
- Anthropic built a Memory Tool and context editing system that cut token use by 84% in a 100-round web search benchmark.
- GAM (General Agentic Memory) splits memory into two specialized agents — a Memorizer that captures everything verbatim and a Researcher that does iterative, multi-strategy retrieval.
- Mastra condenses conversations into external storage outside the main context window.
- Mem0 and A-Mem both offer structured, persistent memory layers for LLM agents.
The common thread: memory is becoming a first-class architectural primitive, not an afterthought tucked into a growing transcript.
This is the shift from "prompt engineering" to what some are calling context engineering — designing what the agent sees, how it's structured, and how it's refreshed, as a deliberate system architecture rather than a stream of tokens.
What This Means for Your Agents
If you're building AI agents — coding agents, research assistants, game bots, customer support — the AgenticSTS paper has three direct implications:
1. Your chat log is a liability. If your agent appends every turn to the prompt, you're paying for context rot whether you see it or not. The agent gets slower, less accurate, and more expensive as the session goes on. Measure your prompt size across a session. You'll be shocked.
2. Structure is cheaper than compute. The AgenticSTS team didn't win by throwing a better model at the problem. They won by architecting what the agent sees. A fixed ~5K token prompt vs. a 527K token prompt isn't a small optimization — it's a 100x efficiency difference in the same task.
3. Memory is model-specific. If you plan to swap models, plan to re-engineer your memory system. The gains from structured memory are coupled to how the model processes context. This has implications for any multi-model agent platform or API gateway.
The Bottom Line
The researchers released their full dataset — 298 completed game runs, frozen memory snapshots, evaluation scripts — on Hugging Face. The arXiv paper (2607.02255) is worth a read if you're building agent infrastructure.
But the headline is simple: the next leap in agent performance won't come from smarter models. It'll come from smarter memory.
Context rot is the silent killer of long-horizon agents. The teams that treat memory as an architecture problem — with typed retrieval, bounded prompts, and explicit, ablative layers — are going to ship agents that don't degrade, don't drift, and don't forget what they learned five minutes ago.
For the rest of us, there's a $64,000 question to answer about our own agents: What's in your prompt?