fix(agent): reserve artifact budget after scratch writes

This commit is contained in:
pewdiepie-archdaemon
2026-09-18 14:29:59 +00:00
parent fd41ff8ce4
commit 7b79117fbf
2 changed files with 14 additions and 6 deletions
+1 -1
View File
@@ -4268,7 +4268,7 @@ async def stream_preview(*, endpoint_url, model, messages, headers, turn_contrac
yield event({'type': 'completion_recovery', 'reason': 'research_before_synthesis'})
if (
required_artifacts
and not successful_write
and not successful_artifact_write
and not artifact_write_phase
and calls >= min(NATIVE_ARTIFACT_RESEARCH_LIMIT, tool_call_limit - 1)
):