You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In one_on_one_debate, each speaker's entire transcript becomes the next speaker's message. Since Agent.run returns the whole conversation by default, context roughly doubles every turn — by turn 3 the message contains turn 1 twice — and both agents also accumulate it in their own memory on top.
response is whatever the caller's agents produce, and Agent's output_type defaults to "str-all-except-first" (swarms/structs/agent.py:349) — the agent's entire conversation, not its answer. message = response then makes that blob the next prompt.
Effect
Turn 1: A answers → response ≈ A's answer.
Turn 2: B receives A's whole transcript as its task, and B's response is B's whole transcript, which now contains A's.
Turn 3: A receives that, so A's own turn-1 output comes back to it — mislabelled as the user's words, and duplicated.
Growth is roughly geometric in max_loops, and each agent's own short_memory grows alongside because run records the incoming task too.
Summary
In
one_on_one_debate, each speaker's entire transcript becomes the next speaker's message. SinceAgent.runreturns the whole conversation by default, context roughly doubles every turn — by turn 3 the message contains turn 1 twice — and both agents also accumulate it in their own memory on top.Where
swarms/structs/deep_discussion.py:53-61:responseis whatever the caller's agents produce, andAgent'soutput_typedefaults to"str-all-except-first"(swarms/structs/agent.py:349) — the agent's entire conversation, not its answer.message = responsethen makes that blob the next prompt.Effect
Turn 1: A answers →
response≈ A's answer.Turn 2: B receives A's whole transcript as its task, and B's
responseis B's whole transcript, which now contains A's.Turn 3: A receives that, so A's own turn-1 output comes back to it — mislabelled as the user's words, and duplicated.
Growth is roughly geometric in
max_loops, and each agent's ownshort_memorygrows alongside becauserunrecords the incoming task too.Suggested fix
Two changes, both small:
assistantrather than as user prose:deep_discussion.pydoes get one thing right: it builds a freshConversation()inside the function (:39), so there is no cross-task leakage.Found at
3e89f27b(v14.0.2).