Repository navigation
fix: keep offloaded tool results from being overwritten by later runs - #13550
Merged
bogdankostic merged 5 commits intoDec 2, 2026
Merged
bogdankostic merged 5 commits into
bogdankostic merged 5 commits into
Conversation
jaeminbird
requested review from
davidsbatista
and removed request for
a team
November 4, 2026 06:43
Contributor
|
@jaeminbird is attempting to deploy a commit to the deepset Team on Vercel. A member of the Team first needs to authorize it. |
Contributor
Coverage reportClick to see where and how coverage changed
This report was generated by python-coverage-comment-action |
||||||||||||||||||||||||||||||||||||
bogdankostic
requested review from
bogdankostic
and removed request for
davidsbatista
November 17, 2026 14:22
Contributor
Author
|
Merged main in (2fc8971), the offloading hook tests still pass. Anything else needed here? |
bogdankostic
approved these changes
Dec 2, 2026
bogdankostic
left a comment
Contributor
There was a problem hiding this comment.
Looks good, thanks @jaeminbird!
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.
Related Issues
No existing issue. This is the case @bogdankostic described on #12487; it was fixed there for
ToolResultOffloadCompactor(uuid suffix) but not forToolResultOffloadHook.Proposed Changes:
ToolResultOffloadHookkeys are{step}_{tool}_{id or call{index}}.step_countrestarts at 0 on everyAgent.run, so with a model that omits or repeats call ids (Ollama, Gemini, Kimi-stylefunctions.search:0), the next turn writes to the same key in a shared store and turn 1's pointer reads turn 2's result.hooks.pynow appendsuuid4().hexto the key, likecompaction/tool_result_offloading.py. Docs page examples updated.How did you test it?
New parametrized
test_later_run_does_not_overwrite_earlier_run_resultsfails 2/2 on main, passes with the fix. Also a two-turn Agent run withFileSystemToolResultStore: on main turn 1's pointer returned turn 2's output.test/hooks+test/components/agents(Windows, py3.12): main 734 passed, fix 736 (7RichConsoleUIfailures on both,richnot installed)ruff check,ruff format --check: cleanNotes for the reviewer
Providers with unique random call ids are unaffected; keys just get longer.
Checklist
fix:,feat:,build:,chore:,ci:,docs:,style:,refactor:,perf:,test:and added!in case the PR includes breaking changes.AI use: this fix was written with AI assistance; the tests above were run before and after the change.