How do I interrupt a loop after multiple iterations?
Yes, you can accept only the first 18 iterations. After he proposes the number of iterations for the loop (500 here), you can choose a lower number of iterations, and both players have to abide to those iterations.

The rules for this are described in 719. Taking Shortcuts. A few quotes from that section:


  719.2a At any point in the game, the player with priority may suggest a shortcut by describing a sequence of game choices, for all players,
  that may be legally taken based on the current game state and the
  predictable results of the sequence of choices. This sequence may be a
  non-repetitive series of choices, a loop that repeats a specified
  number of times, multiple loops, or nested loops, and may even cross
  multiple turns. It can’t include conditional actions, where the
  outcome of a game event determines the next action a player takes. The
  ending point of this sequence must be a place where a player has
  priority, though it need not be the player proposing the shortcut.
  
  719.2b Each other player, in turn order starting after the player who suggested the shortcut, may either accept the proposed sequence, or
  shorten it by naming a place where he or she will make a game choice
  that’s different than what’s been proposed. (The player doesn’t need
  to specify at this time what the new choice will be.) This place
  becomes the new ending point of the proposed sequence.
  
  719.2c Once the last player has either accepted or shortened the shortcut proposal, the shortcut is taken. The game advances to the
  last proposed ending point, with all game choices contained in the
  shortcut proposal having been taken. If the shortcut was shortened
  from the original proposal, the player who now has priority must make
  a different game choice than what was originally proposed for that
  player.