fix: preserve research state at the web budget limit - #1265
Merged
Conversation
- Keep remaining tools available so research can finish after web denial - Preserve cached citation metadata and prevent exhausted automatic replay - Keep tool-schema errors out of attachment conversion and honor finite budgets
Semgrep Security ScanNo security issues found. |
|
Preview environment destroyed 🧹 Stack |
PR Metrics
Updated Sat, 05 Sep 2026 00:11:00 GMT · run #2947 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When research hit its web budget, the Pi adapter disabled every tool, which could produce an invalid empty
toolspayload. An automatic replay could then discard the partial answer and its gathered evidence. Keep non-web tools available after the first denied web call, steer the running model toward supported findings and disclosed gaps, and prevent exhausted automatic replay while retaining manual Retry.The logical turn's web budget now owns cached citation metadata, so permitted retries preserve existing source labels. Structured
param: "tools"errors remain nonretryable and no longer trigger attachment conversion. Research instructions defer their minimums to explicit exhaustion; the 2/12/30 caps are unchanged, and the skill default version/snapshot is bumped to 7.Validation:
bun run checkpasses (0 lint errors, 397 warnings).2341271006: 4,924 pass, 3 skip; shared/script phase: 266 pass. Randomized full-script runs were not uniformly green: seed2791290889reproduces the same twoindexedDB is undefinedsync-retry failures on both pristine main (913171eb) and this PR. An initial mobile-drawer failure did not recur in its isolated or same-seed full replay. These baseline test-isolation issues are unchanged.Real-provider validation on the combined reviewed tree used the original project credentials and actual EXA search, with no attestation or encryption bypass:
All requests in these latest completed cases returned HTTP 200. Both models synthesized after exhaustion with tools reduced from 8 to 6, without an empty-tools 400. The isolated PR's files match the live-validated file hashes.
Limits: this verifies the scoped regressions, not exhaustive answer quality. An initial DeepSeek answer omitted the requested table; a later run included it, and research still contained unverified warranty estimates. The unchanged 200-source registry cap left some references above 200 unlinked. A previous 28-call DeepSeek attempt was invalidated by unexpected navigation, not proven to be an upstream-only failure; the final isolated run with development HMR disabled completed without manual Retry. User-button Retry is covered by deterministic real-UI testing, not claimed for that successful live run. The known open-SSE Stop failure is explicitly excluded because another PR owns it; no Stop changes are included.
This PR and the streaming-display PR target main independently.