Skip to content

SQLiteSession: Consecutive same input should still trigger tool execution #1496

@AyanAhmedKhan381

Description

@AyanAhmedKhan381

Describe the bug
When using SQLiteSession, if the user gives the same input consecutively, the tool is not invoked the second time.
Expected behavior: Tool should be invoked every time regardless of same input.

To Reproduce

  1. Create an agent with a tool using SQLiteSession
  2. Call the agent with the same input twice
  3. Observe that second call does not invoke the tool

Expected behavior
Every call should invoke the tool, even if the input is the same as the last one.

Environment

  • OS: Windows 10
  • Python: 3.10
  • openai-agents-python version: latest main branch

Additional context
I believe the issue is caused by caching logic in src/agents/memory/session.py which skips consecutive duplicate inputs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionQuestion about using the SDK

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions