Skip to content

fix: #2426 persist streamed run-again tool items to session#2433

Merged
seratch merged 1 commit intomainfrom
fix/streamed-session-tool-persistence
Feb 6, 2026
Merged

fix: #2426 persist streamed run-again tool items to session#2433
seratch merged 1 commit intomainfrom
fix/streamed-session-tool-persistence

Conversation

@seratch
Copy link
Member

@seratch seratch commented Feb 6, 2026

This pull request resolves #2426: a streamed session persistence gap where Runner.run_streamed did not save tool call items when the turn ended with NextStepRunAgain, causing follow-up turns to miss prior tool execution context (for example, repeated tool calls in multi-turn flows, including handoff scenarios).

The streamed loop now persists turn session items in the run-again path, aligning behavior with non-streaming Runner.run. A regression test that verifies both function_call and function_call_output are stored in session history for streamed tool-call turns is also added.

@seratch seratch added this to the 0.8.x milestone Feb 6, 2026
@seratch seratch added bug Something isn't working feature:sessions labels Feb 6, 2026
@seratch seratch merged commit 56ec673 into main Feb 6, 2026
10 checks passed
@seratch seratch deleted the fix/streamed-session-tool-persistence branch February 6, 2026 22:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working feature:core

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tool-Calls not saved in session

1 participant