Files
sdk-dev 6a306f310d
Test / test (3.11) (push) Successful in 1m50s
Test / test (3.12) (push) Successful in 1m49s
Test / test (3.13) (push) Successful in 1m52s
dev-lead/test test
[Do] Base branch ack
sop-checklist / all-items-acked Base ack
feat(sdk): add stop_event parameter to run_heartbeat_loop and run_agent_loop
Resolves KI-009. Both loops now accept a threading.Event that, when set,
causes immediate clean exit with return value "stopped". The check is
ordered before max_iterations so a signal always wins.

New tests:
- test_run_loop_exits_on_stop_event: event set before loop — 0 iterations
- test_run_loop_respects_stop_event_between_iterations: event set mid-run
- test_run_agent_loop_exits_on_stop_event: same for run_agent_loop

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-11 05:05:39 +00:00
..