Tutorials · Claude Agent SDK · examples / outputs / p1_goal_loop.txtExample code

Example code · outputs

p1_goal_loop.txt

Captured output of p1_goal_loop

Raw fileDownload all examples (zip)See the script →

  tool: Bash find . -type f -name "*.py" | head -50
  tool: Read /tmp/demo/project/...
  tool: Read /tmp/demo/project/...
  tool: Edit /tmp/demo/project/...
  tool: Bash python3 -m unittest -q tests.test_utils
  [Stop hook] iteration 1: tests PASS

[result] success after 6 turns, $0.0701
[result] All 5 tests pass. Fixed `calculate_average` to return `0.0` on empty input and `get_user_name` to handle `None`/missing-key cases, adding type hints per project convention.

Final verification outside the agent: tests pass = True; Stop-hook verdicts = [True]

12 lines · Back to the folder