Skip to content

Comments

fix: prevent duplicate messages during sequential breakpoint resumes#194

Merged
cristipufu merged 1 commit intomainfrom
fix/agent-framework-duplicate-messages-breakpoints
Feb 22, 2026
Merged

fix: prevent duplicate messages during sequential breakpoint resumes#194
cristipufu merged 1 commit intomainfrom
fix/agent-framework-duplicate-messages-breakpoints

Conversation

@cristipufu
Copy link
Member

Summary

  • Promoted executors_with_messages from a local variable to instance state (self._executors_with_messages) in UiPathAgentFrameworkRuntime so it persists across _stream_workflow() calls within the debug runtime's breakpoint resume loop
  • Without this fix, using breakpoints on all nodes in a sequential workflow caused the final "end" executor's output event to re-emit all messages already shown in earlier breakpoint iterations, resulting in duplicated chat messages
  • Added a regression test (test_sequential_breakall_no_duplicate_messages) that verifies each agent's text appears exactly once when breakpoints are enabled on all nodes

Test plan

  • New test test_sequential_breakall_no_duplicate_messages verifies no duplicate messages
  • Test confirmed to fail without the fix (researcher text appeared 2 times)
  • All 121 existing tests pass

🤖 Generated with Claude Code

@cristipufu cristipufu force-pushed the fix/agent-framework-duplicate-messages-breakpoints branch from 7a19933 to 62ab2aa Compare February 22, 2026 08:28
@cristipufu cristipufu self-assigned this Feb 22, 2026
…sumes

Promote `executors_with_messages` from a local variable to instance state
(`self._executors_with_messages`) so it persists across `_stream_workflow()`
calls within the debug runtime's breakpoint resume loop. Without this,
the final "end" executor's output event would re-emit all messages that
were already shown in earlier breakpoint iterations.

Includes a regression test for sequential workflows with breakpoints on
all nodes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@cristipufu cristipufu force-pushed the fix/agent-framework-duplicate-messages-breakpoints branch from 62ab2aa to b4750e2 Compare February 22, 2026 08:30
@cristipufu cristipufu merged commit b6f58f0 into main Feb 22, 2026
46 checks passed
@cristipufu cristipufu deleted the fix/agent-framework-duplicate-messages-breakpoints branch February 22, 2026 08:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant