Conversation
…l does not kill the turn (cherry picked from commit 3d1a9cd6404de03bad7b62fcca30a4137ea3de2f)
|
Thanks for this, and nice clean diff — but after tracing the original feature I'm going to close this, because the behavior you're changing is intentional rather than a bug. The tool-loop guardrail (added in the original The design intent: once a tool call is proven to be a hopeless loop (same call failed N times, or a read-only call returned the identical result N times), the guardrail synthesizes a controlled tool result, emits the "I stopped retrying X" explanation, and ends the turn cleanly. The synthetic result exists to keep message-role alternation valid on the way out — not to keep the loop going. There is no "block, then continue and recover" path in the feature; that's what Flipping Worth noting this whole path is gated behind If the goal is "let the agent recover from a recoverable loop instead of halting," that's a real idea, but it belongs as a distinct non-terminal action (a Appreciate the contribution regardless — closing as intended-behavior. |
|
@teknium1 thanks for the detailed explanation, I have enabled the flag without understanding it fully which led me to believe something was wrong in the code there, thanks again, and if you would have time to look at the #43154 alpine support I made for the gateway, would be really nice for next release |
Repairs tool_guardrails: a block decision should stop that tool call only, but the controller was setting the turn-halt flag for both block and halt. Result: the agent treated an idempotent-block as a hard stop, halting the session on the first blocked read-only call. Fix: should_halt now matches only action == halt. The block action still returns a synthetic try-different-path result, which is the right agent recovery behavior.