When a player loses and leaves the game in Commander (or any multiplayer game), the game immediately handles all objects that player owns or controls in various zones. For spells on the stack, CR 800.4a is the governing rule: all spells and abilities on the stack controlled by the leaving player are exiled.
This happens regardless of whether the spell was originally owned by someone else (e.g., cast via Mindslaver effects). The key factor is control at the moment the player leaves — if that player controlled the spell on the stack, it is exiled. Any objects they own in other zones (hand, library, graveyard, exile) are also removed from the game per the same rule.
Importantly, any abilities already on the stack that are controlled by other players but were triggered or activated due to that player's actions are not removed — only the leaving player's own spells and abilities are exiled.
Concrete example: In a Commander game, Player A casts Fireball targeting Player B. Before Fireball resolves, Player A loses the game (say, from a state-based effect like decking out). Fireball is on the stack under Player A's control, so it is immediately exiled — it never resolves, and Player B takes no damage from it.
References: CR 800.4a covers the removal of a player's spells and abilities from the stack when they leave the game, and CR 800.4 outlines the broader rules for players leaving a multiplayer game.
Unofficial fan resource — not affiliated with or endorsed by Wizards of the Coast. Answers are AI-generated estimates grounded in the Comprehensive Rules and are not a substitute for an official judge. Verify anything match-critical.