Skip to content

fix(engine): give the model a final answer turn when max_iterations i… - #153

Merged
Asaf-prog merged 1 commit into
extra-org:mainfrom
Rsakhuja:fix/max-iterations-final-answer
Oct 22, 2026
Merged

Asaf-prog merged 1 commit into
extra-org:mainfrom
Rsakhuja:fix/max-iterations-final-answer

Conversation

@Rsakhuja

@Rsakhuja Rsakhuja commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #152

Hitting max_iterations broke out of the tool loop and returned the last model response, which at the cutoff is always a tool request with no text. Runs ended as completed with an empty answer, and child agents handed their orchestrator an empty result.

Answer the pending tool calls with the existing blocked_message() without executing them and give the model one final, checkpointed turn to answer with what it has. If that turn still has no text, return a fixed fallback answer so a capped run never ends empty.

…s hit

Hitting max_iterations broke out of the tool loop and returned the last
model response, which at the cutoff is always a tool request with no text.
Runs ended as completed with an empty answer, and child agents handed their
orchestrator an empty result.

Answer the pending tool calls with the existing blocked_message() without
executing them and give the model one final, checkpointed turn to answer
with what it has. If that turn still has no text, return a fixed fallback
answer so a capped run never ends empty.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Asaf-prog
Asaf-prog merged commit ffe1d2f into extra-org:main Oct 22, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Hitting max_iterations ends the run with an empty answer reported as completed

2 participants