What I was getting wrong about deciding when an agent should stop · PitHub