Skip to content

Commit c44e8a8

Browse files
committed
copy
1 parent 72f9a66 commit c44e8a8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pydantic_ai_slim/pydantic_ai/agent/abstract.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,7 @@ async def stream_to_final(
493493
raise exceptions.AgentRunError('Agent run produced final results') # pragma: no cover
494494
yielded = True
495495

496-
messages = graph_ctx.state.message_history
496+
messages = graph_ctx.state.message_history.copy()
497497

498498
async def on_complete() -> None:
499499
"""Called when the stream has completed.

0 commit comments

Comments
 (0)