Patch Changes
- #11877
2f4d891Thanks @byhow! - feat(agents): add opt-ininterruptMode: "per_call"tohumanInTheLoopMiddleware. Each gated tool call raises its own interrupt (type: "tool_approval", with a typedresponseSchemabuilt from the tool's allowed decisions), answered by interrupt ID.respondis supported. Edits are pinned to the called tool and checked against the input side of its Zod v4 schema, so its transforms run once, when the tool does. An invalid answer throws without being saved. Also addsInterrupt.response_schema. In both modes,interruptOn: { tool: true }now allows every decision,respondincluded, as in Python; batched mode is otherwise unchanged.