You are building a developer productivity agent with the Claude Agent SDK that autonomously fixes lint errors across a repository. Your custom agentic loop must decide, after each API response, whether to keep executing tools or to finish. Which control-flow design is correct?