Skip to content

Agent responses are repeated multiple times #1814

@raul-marcano-reimundez

Description

@raul-marcano-reimundez

Describe the bug

Sometimes an agent response is repeated multiple times within the same turn.

This leads to two main problems:

  • Performance impact: the request takes significantly longer compared to other calls.
  • Cost impact: the repeated responses are then included as input in the following conversation turn, unnecessarily increasing token usage and costs.

Debug information

  • Agents SDK version: v0.3.2
  • Python version Python 3.11.9

Repro steps

Run an agent conversation using the Python SDK.
Observe that in SOME CASES the assistant’s reply is duplicated or repeated multiple times.
Check the following conversation turn and note that the duplicated messages are included as part of the input.

Expected behavior

The agent should return its message once per turn, without duplication.

Screenshots / Logs:

Attached are screenshots from the OpenAI platform showing the issue.

Image

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions