v0.2.9
Tunable maxSteps cap (#6)
Adds a step cap on agent runs — a "step" is one Pi turn (one model call plus the tool executions it triggers).
- Programmatic:
run({ maxSteps });RunResult.maxStepsReachedreports whether the cap stopped the run. - CLI:
--max-steps <n>. - When the agent completes
maxStepsturns and still wants to continue, the run stops cleanly (agent_end, exit 0) and emits a gatedmax_steps_reachedevent. Suppressed when no cap is hit, so default-run JSONL stays byte-identical.
Pi exposes no max-turns / shouldStopAfterTurn seam through its SDK, so the cap is enforced from the event stream (count turn_end, abort when exceeded).