When Should an Agent Stop Thinking?