Skip to content

Python: [Bug]: HandoffBuilder drops agent-level compaction_strategy when cloning participants #8320

Description

Description

Summary:
HandoffAgentExecutor._clone_chat_agent() rebuilds each
participant agent to inject handoff tools and middleware, but
does not forward the agent’s compaction_strategy. Because these are stored outside default_options,
the cloned executor agent gets None for both and silently
falls back to client defaults/no compaction.

Expected:
A participant’s supported agent-level compaction
configuration remains effective when that participant is used
through HandoffBuilder.

Actual:
The original Agent.compaction_strategy are discarded during cloning.

Root cause / proposed fix:
Forward both fields in the Agent(...) call within
_clone_chat_agent, and add a clone-retention regression test.

Code Sample

Error Messages / Stack Traces

Package Versions

agent-framework-orchestrations: 1.1.1 (with agent-framework- core: 1.18.0)

Python Version

Python 3.11

Additional Context

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

orchestrationUsage: [Issues, PRs], Target: multi-agent orchestration (high-level patterns)pythonUsage: [Issues, PRs], Target: PythonreproducedUsage: [Issues], Target: all issues that can be reproduced by the triage workflow

Type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions