mirror of
https://github.com/agent0ai/agent-zero.git
synced 2026-12-04 17:38:45 +00:00
Store a neutral {} for rejected or incomplete leaked calls so retries do
not reinforce malformed XML or JSON. Keep the original result available
for diagnostics and preserve the existing warning and retry limits.
Remove replayable output items from the history copy and clear the
Responses continuation after normal history insertion. Retain recorded
turn IDs and usage while forcing the next request to use cleaned history.
This works with Context Doctor enabled or disabled.
Validation: 349 focused parser, dispatch, history, Responses, streaming,
Context Doctor, and retry-limit tests passed for this standalone change.