fix(harness): propagate memoryConfig to general-purpose subagent - #2616
fix(harness): propagate memoryConfig to general-purpose subagent#2616dangzitou wants to merge 10 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
This PR fixes a configuration propagation gap in the harness subagent construction path: the built-in general-purpose subagent now inherits the parent HarnessAgent.Builder’s memoryConfig, preventing behavior drift from explicitly configured long-term memory settings.
Changes:
- Capture
HarnessAgent.Builder#memoryConfigwhen building the general-purposeSubagentFactory. - Apply the captured config to the generated subagent via
sub.memory(capturedMemoryConfig).
PR title note (conventional commits): The current title includes quotes and doesn’t follow the type(scope): description format; consider something like fix(harness): propagate memoryConfig to general-purpose subagent.
| if (capturedGenOpts != null) sub.generateOptions(capturedGenOpts); | ||
| if (capturedMemoryConfig != null) sub.memory(capturedMemoryConfig); |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
CLA Not Signed The Contributor License Agreement (CLA) check is currently pending on this PR ( @dangzitou please sign the CLA via the CLA assistant badge in the comment above, or visit https://cla-assistant.io/agentscope-ai/agentscope-java. Once signed, the Automated check by github-manager-bot |
oss-maintainer
left a comment
There was a problem hiding this comment.
Summary
LGTM — code changes look good, but this PR cannot be approved/merged until the contributor signs the CLA (see the CLA reminder comment above).
Automated review by github-manager-bot
Issue
Fixes #2549
Describe the background, purpose, changes made, and how to test this PR
When building a general-purpose subagent,
HarnessAgentBuilderSupportdid not propagatememoryConfigfrom the root builder into the generated subagent factory. This causes behavior drift versus explicitly configured memory settings.Changes
HarnessAgent.Builder#memoryConfiginto a local final variable.sub.memory(capturedMemoryConfig)during construction.Acceptance report
fix(harness): propagate memoryConfig to general-purpose subagent.license/claremains pending until the contributor signs the CLA.How to test
Checklist
mvn spotless:apply.