Skip to content

Python: Bug: max_round_count ends loop without returning results—unlike AutoGen behavior #12625

@zaid4hmed

Description

@zaid4hmed

Describe the bug
Using Semantic Kernel with max_round_count set to limit iterations stops execution correctly, but instead of returning the partial results accumulated so far, the output is simply:
"max round reach"
This differs from AutoGen, which returns the available result at the limit, then stops.

To Reproduce
Steps to reproduce the behavior:

  1. Configure kernel with a prompt loop and set kernelConfig.max_round_count = N
  2. Execute kernel.run(...) or .InvokeAsync([...])
  3. Observe behavior once iterations = N

Expected behavior
When max_round_count is reached, SK should return the content generated up to that point—like AutoGen—rather than just an error message.

Platform

  • Language: [Python]
  • AI model: [AzureOpenAI gpt-4.1-mini]
  • IDE: [Visual Studio, VS Code]
  • OS: [Windows]

Additional context
SK could mimic AutoGen by returning partial/last result when max iterations is met.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingmulti-agentIssues for multi-agent orchestrationpythonPull requests for the Python Semantic Kernel

Type

Projects

Status

Sprint: Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions