Repository navigation
v0.24.2
A patch release: a run that a tool batch ended on purpose is no longer indistinguishable from one cut after its tools.
Added
terminate: true on a tool entry and its live tool_finished (#702, closes #700). A tool call can ask to end its run: the tool returns terminate: true, or a tool_call hook sets it when it blocks the call. When every call answering one assistant message asks it, pi makes no further model call for that batch, and the run settles completed with no answer after those tool entries, unless a queued steer or follow-up continues it. Until now nothing in the record said so, so a client reading history back (duang) showed such a run as cut short and offered Retry, which would run the tools' side effects again. The flag now separates the two cases.
- The flag is per result. A run ended on its tool batch when every
toolentry answering the last assistant entry carries it. Live,run_settledremains what says the run ended. - A batch in which only some calls ask goes on as usual, and only the results that asked carry the flag.
- A call made from inside another tool (
parentToolCallId, codemode,ctx.executeTool) is not part of the batch and never carries the flag. pi ignores itsterminatetoo. ToolFinishedEvent.datagainsterminate?: true, and thetoolentry payload gainsterminate?. Both are additive. Documented indocs/design/session-control.md.
Docs
docs/design/agent-model.md and docs/design/agent-cli.md (#697): proposed design notes for the agent model (Agent = model + harness + context, run as an instance) and its CLI. Nothing in them is implemented yet.
Full Changelog: v0.24.1...v0.24.2