Write a partial report instead of erroring out when research hits max turns #8
Loading…
Reference in a new issue
No description provided.
Delete branch "worktree-deep-research-max-turns-report"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
When the researcher agent exhausts its
MAX_RESEARCH_TURNSbudget mid-investigation, the run previously just propagatedrig's error and the wholeresearch()call failed — losing all the searching/fetching work done up to that point.rig-agent0.41.0'sPromptError::MaxTurnsError { chat_history, .. }carries the full chat history at the point the budget ran out, so this catches that specific error, reconstructs a findings dump from whatever assistant text and tool results (search/fetch output) are in that history, and still runs the writer pass on it — with a hard-coded disclaimer (guaranteed regardless of what the writer model does) plus writer instructions to flag the report as inconclusive and call out thin/missing evidence.Other errors still propagate normally via
?.Test plan
cargo check -p deep_researchcargo test -p deep_researchcargo clippy -p deep_research(clean)