Why your AI RPG companion keeps casting the wrong spell
Your level 15 Archmage ally faces a five enemy encounter and casts Hold Person. Next round, Hold Person again. After six rounds of asking the narrator to make the wizard do something useful, he switches to Vicious Mockery while the enemy casters keep landing necrotic damage that hits even on a save. If you have played an AI RPG with companions in combat, you know this exact frustration.
It feels random. It isn't. The reason your AI companion keeps casting the wrong spell is architectural, and it traces back to the same root cause as every memory failure in the category. Here is why it happens, what a working companion combat system has to do instead, and how we built around it.
1. The pattern: your AI Archmage keeps casting Hold Person
You have probably lived some version of this. A capable spellcaster on your side, a hard fight, and a companion who reaches for the same handful of spells no matter what the encounter calls for. Hold Person against enemies that are immune. Vicious Mockery as a primary attack. A control spell on a single weak target when the fight needs damage on a cluster of strong ones.
The tell is repetition. A good caster reads the room and changes plans. The AI version locks onto a spell and casts it again, and again, even after it plainly failed the round before. You can feel the gap between what the character should know and what the system is actually doing. Your archmage has a full spell list on paper. In practice he behaves like he has three spells and a coin flip.
This is not one product's bug. The same complaint shows up across AI RPGs that hand combat to the language model, in close to the same words every time: the AI ally is useless in a fight, picks bad spells, wastes turns, ignores what just happened. The shape of the complaint is consistent because the architecture underneath is consistent. When you understand the cause, the repetition stops looking like a glitch and starts looking like exactly what the design guarantees.
2. Why this happens: LLMs pick narratively famous spells, not tactically optimal ones
Language models are trained on text. Mountains of it. And in fantasy text, some spells are simply more famous than others. Hold Person, Vicious Mockery, Fireball, Magic Missile show up constantly across D&D actual-play transcripts, fan fiction, YouTube scripts, campaign write-ups, and Reddit threads. They are high-frequency tokens. The model has read the sentence "the wizard casts Hold Person" thousands of times.
So when an AI RPG asks the model, mid-fight, to choose a spell for an NPC caster, the model does what it was trained to do. It reaches for the choice that reads as canonical. "The Archmage casts Hold Person" looks like correct fantasy regardless of whether Hold Person is the right call against this enemy in this moment. Famous beats optimal, because famous is what the training reinforced.
What it does not do is tactical reasoning. "Disintegrate is the highest expected damage here once I account for this enemy's necrotic resistance and failing save" is not a sentence the model retrieves from familiarity. It is a calculation, and the model is not running a calculation. It is predicting plausible text. Plausible text and an optimal play are different things, and in combat the difference is the whole game.
Watch it happen in slow motion. A human player looks at five clustered enemies and thinks: that is an area spell, because hitting five targets beats hitting one. The model looks at the same scene and weighs which spell-shaped sentence is most likely to come next, and "casts Hold Person" is a very likely sentence. The human is reasoning about the board. The model is reasoning about the text. When the board and the text disagree, which in a tuned encounter they almost always do, the model follows the text, and your archmage burns the turn on a single-target control spell while the fight gets worse.
If that sounds familiar, it should. It is the same failure that drives AI RPGs to forget your story. The model improvises from training-data familiarity instead of reading from structured state. Memory failure and tactical failure are two faces of one architectural mistake.
3. The deeper architecture problem: LLMs as decision-makers vs storytellers
Step back from spell choice for a second, because spell choice is just the symptom you happened to notice.
The real pattern is this: most AI RPGs hand the language model decisions it has no business making. What does this NPC remember about you? Does the guard recognize you as wanted? Do you still have the silver dagger you stole in session two? What spell does this caster pick? Each of those is a structured decision. Each requires state tracking, consistency across turns, and mechanical reasoning. And the language model is weak at all of them for the same reason. It is a text predictor, not a state machine.
Here is the part that gets missed. The model is genuinely excellent at one job. Given a decision that has already been made, it writes prose that lands. "Anelise levels her staff and a lance of green fire opens the lich's robes to the bone" is the model doing exactly what it is good at. The failure is never the narration. The failure is asking the narrator to also be the rules engine and the tactician at the same time.
Think about what a human Game Master actually does at the table. They keep your character sheet, they remember the favor you owe the village elder, they know the monster's stat block, and only after all of that do they describe the scene. The describing is the last step, downstream of a stack of bookkeeping and judgment. An AI RPG that pipes everything through the model collapses that stack into a single act of text prediction. The bookkeeping does not happen, so the judgment cannot, and the prose ends up confident and wrong.
The architecture that works splits those jobs. A structured layer holds the state and makes the structured decisions. The model narrates what that layer resolved. We unpacked this for memory specifically in why every AI RPG forgets your story and why AI Game Masters forget your story, and it is the same line we draw when comparing generated-world systems in best AI Dungeon alternatives in 2026 and Voyage alternatives for players who want a curated story. Tactical AI is one more place the same thesis holds. Let the model narrate. Do not let it decide.
4. What needs to be true for an AI companion to stop casting the wrong spell
If you want to evaluate any companion combat system, these are the structural requirements that separate a resolver from an improviser. A system that has all five tends to behave like a competent ally. A system missing any of them tends to produce the Hold-Person-on-repeat pattern.
- A locked tactical archetype per companion. Offensive caster, control specialist, support, healer, or tank. The archetype does not drift turn to turn. An offensive caster optimizes for damage. A control specialist optimizes for shutting the battlefield down. Whatever the role, it stays consistent across the whole encounter and across encounters.
- Deterministic spell selection from structured combat state. The system reads opponent HP percentages, save weaknesses, action economy, concentration, party health, distance, and terrain, then picks the best option from the companion's actual spell list for that exact situation. The choice is resolved from data, not improvised from vibes.
- Cross-turn memory of tactical decisions. Hold Person got resisted last round? The system knows, and it adjusts. The model does not carry that thread across turns. The structured combat layer does, the same way a human player remembers what already failed.
- The model narrates the resolved decision, and only that. Once the tactical layer picks the spell, the model describes it. It never reaches into the spell list itself. Narration is downstream of the decision, never the source of it.
- A player override that regenerates from the tactical layer. When the system makes a call you disagree with, you should be able to step out, say so, and have the decision regenerated from the combat logic, not from a fresh round of improvisation. Correcting the prose is not the same as correcting the decision.
The throughline is simple. Every one of these moves a decision out of the model and into a system that can actually reason about it, and leaves the model with the one job it is good at. None of it is exotic. It is the same separation any halfway serious game engine has used for decades. The novelty in AI RPGs is that so many products skipped it.
5. How Branching Skies handles it
Read this as the in-house pitch it is. Branching Skies is our product, and it is pre-launch, so what follows is a design claim grounded in how the system is built, not a report from a shipped game you can play tonight.
Companion combat in Branching Skies is designed to run on the structure above rather than on live improvisation. Each companion is authored with a locked tactical archetype, set when the character is built, not negotiated turn to turn. Spell selection is designed to resolve deterministically from a combat layer that reads opponent state, party state, action economy, and concentration, then picks from the companion's real spell list for the situation in front of it. The language model's job is the narration. It describes what the resolver chose. It is built so the model never picks the spell.
The player override is the part we are most proud of, and it is where our ASK and ACT design earns its place. During play you are in ACT mode, telling your character what to do. Tap a name and you switch to ASK mode, where you step out of the scene and talk to Algus directly. The distinction matters more than it sounds. In ASK mode Algus knows you are speaking to him as the Game Master, about the game, not as a voice inside the fiction. So when a combat call looks wrong, you can say "Anelise should be hitting harder here, not crowd-controlling," and the system is designed to regenerate that decision from the tactical layer rather than paper over it with new prose. You are correcting the call, not arguing with a character. This is the combat-side application of the verification and correction loop we built the whole product around.
Honest caveats, the same ones we give everywhere. It is pre-launch. Beta access is opening, not open. It is iOS first at launch, and Syrinway is the only world to start. Judge the architecture on its merits now, and the rest when you can play it.
6. What to look for in any AI RPG before you commit your campaign to it
You do not need to take our word for any of this. You can interrogate any AI RPG yourself before you sink a campaign into it. Five questions sort the resolvers from the improvisers, and you can ask them in a product's Discord, its docs, or its subreddit in about five minutes.
- "What decides which spell my AI ally casts?" If the answer is "the AI" or "the model," or the answer is vague, combat is improvised, and you should expect Hold Person on repeat. If the answer is "a tactical algorithm based on the encounter state," that is the structured shape you want.
- "Does my companion have a tactical archetype that stays fixed?" Offensive, control, support, and the rest should be locked at the character level, not re-rolled every turn.
- "Can I correct the AI when it picks the wrong spell?" If your only tool is editing the narrator's text after the fact, the underlying decision is still made by improvisation. Real correction regenerates the choice from the combat logic.
- "Does the system remember what worked last round?" If it doesn't, you will watch the same failed strategy run on a loop.
- "Is the AI improvising the world's state, or reading from it?" This is the broader version of the same question, and it predicts almost everything else. We go deep on it in why AI Game Masters forget your story.
If you want a longer checklist for evaluating the whole category, not just combat, we wrote how to find an AI campaign that actually remembers and ranked the field in the 2026 mobile AI RPG buyer's guide. The combat question slots into the same method. Ask where the decision lives. The answer tells you whether your archmage will read the room or cast Hold Person until the fight is over.
7. What we're building, and how to try it early
Branching Skies is a curated, mobile-native AI RPG set in Syrinway, a world we have run as a homebrew tabletop campaign for close to a decade. The world is authored. Your choices are stored as facts the narrator reads from. And combat is designed so a structured layer makes the tactical calls while Algus narrates them, which is the whole reason your companion is built to stop casting the wrong spell.
The first closed beta drops later this year, and the early list is open now. If the Hold-Person-on-repeat pattern is why you went looking for something better, this is the architecture we built for you. The form below puts you on the beta list.