During the cleanup step, two things happen in order: first, the active player discards down to their maximum hand size (usually 7), then all damage is removed from permanents and 'until end of turn' effects end. Crucially, these actions are performed directly as state-based rule actions — they do not use the stack (CR 514.1).
Because these actions don't go on the stack, no player receives priority during the cleanup step under normal circumstances (CR 514.3). This means no one can cast spells, activate abilities, or respond to the discard in any way. The discard simply happens.
The one exception: if a triggered ability triggers during the cleanup step (or if a state-based action needs to be checked), then players do get a round of priority to handle those triggers, and then another cleanup step follows afterward (CR 514.3). But the discarding itself still cannot be responded to.
Concrete example: You end your turn with 9 cards in hand. In the cleanup step you must discard 2 cards — your opponent cannot respond by casting an instant before you choose which cards to discard, nor can they use a 'whenever a card is discarded' trigger to influence your choice in that window. Those triggers would go on the stack only after you've already discarded.
Note on hand size: If a triggered ability fires because of the discard (e.g., a 'whenever you discard' trigger), it goes on the stack in the additional priority window that opens, and players may then respond normally before the next cleanup step begins (CR 514.3).
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.