Skip to content

v2.2.0

Choose a tag to compare

@github-actions github-actions released this 02 Oct 13:04
· 7 commits to main since this release

shipit-agent 2.2.0

Smarter routing and spending, agents that keep going until the work is done, and a set of fixes for small models found in long live chat sessions.

New

  • Stop hooks: AgentHooks.on_stop sees the answer the agent is about to give and can send it back to work with a reason, like Claude Code's Stop hooks. A run is sent back at most 3 times (stop_blocked, stop_unresolved, stop_hook_error).
  • Per-step model routing: StepRouter runs routine steps on a fast model and planning, recovery and the final answer on a strong one.
  • Session token budget: max_session_tokens caps spending across every run of an agent or one chat session.

Fixed

  • JSON answers no longer vanish. Text-call healing matched any JSON object to a tool that takes no arguments, so an answer like {"name": …} became a phantom tool call and was removed from the reply. Structured-output answers were re-run as tool calls, and real nameless calls became ambiguous and were dropped.
  • No more runaway loops. A model that kept calling a tool after the runtime switched to a text-only step looped to max_iterations. In one live case that was 16 model calls and ~72k tokens for a one-line answer; the same request now takes ~2.9k tokens.
  • The question stays last. The grounding reminder was its own trailing message, and small models answered it instead of the question. It now rides on the request as a labelled note.
  • on_user_prompt hooks work. They were documented but never called; both runtimes now run them (rewrite, or block with prompt_blocked).

Full details in CHANGELOG.md.

What's Changed

  • test: make optional-dependency tests pass on a clean install by @iamrraj in #32
  • fix(anthropic): stop the stream when a guard says stop by @iamrraj in #34
  • Per-step model routing (StepRouter) and a session-wide token budget by @iamrraj in #33
  • Stop hooks: keep the agent working until it's really done by @iamrraj in #35
  • fix: small-model loops and answers to the reminder instead of the question by @iamrraj in #36

Full Changelog: v2.1.0...v2.2.0