Skip to content

Tool-Calls not saved in session #2426

@Maxi-J

Description

@Maxi-J

Describe the bug

When using sessions (no matter which type), the tool calls are not saved, which results in repeated tool calls after each turn, as the LLM lacks the previous tool call's output and awareness that the tool has already been called.

In case it matters, I am using the streamed runner. The expected tool call events in result.stream_events() are properly present though, just not automatically persisted in the session, which I would expect.

Using my own custom session doesn't help either, as the add_items() function doesn't receive the tool call entries in the first place.

Handoffs have no input filter set.

Debug information

  • Agents SDK version: 0.8.0
  • Python version: 3.14.2

Repro steps

Seems a general issue to me, happy to supply an example if it works for others.

Expected behavior

Tool calls including outputs are persisted in the session, so the following turns can use that info.


If you can't reproduce or need additional info, let me know. Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions