code: <R> R withPrompting(Supplier<R> action) {
      if (prompting) {
        throw new IllegalArgumentException();
      }
      prompting = true;
      try {
        return action.get();
      } finally {
        prompting = false;
      }
    }
docs: Enables prompting, applies an action, and disables prompting.