Skip to content

feat(harness): allow disabling general-purpose subagent#2354

Open
logicwu0 wants to merge 1 commit into
agentscope-ai:mainfrom
logicwu0:fix/2340-disable-general-purpose-subagent
Open

feat(harness): allow disabling general-purpose subagent#2354
logicwu0 wants to merge 1 commit into
agentscope-ai:mainfrom
logicwu0:fix/2340-disable-general-purpose-subagent

Conversation

@logicwu0

Copy link
Copy Markdown
Contributor

AgentScope-Java Version

2.0.1-SNAPSHOT

Description

HarnessAgent always registers the built-in general-purpose subagent when subagent support is enabled. This can interfere with explicitly declared subagents by allowing the built-in agent to handle tasks intended for them.

This change adds disableGeneralPurposeSubagent() to disable only the built-in entry while keeping programmatic, workspace-defined, and custom subagents available. Both static and dynamic subagent registration paths honor the new option.

Fixes #2340

Checklist

  • Code has been formatted with mvn spotless:apply
  • All relevant tests are passing
  • Javadoc comments are complete and follow project conventions
  • Related documentation has been updated
  • Code is ready for review

@codecov

codecov Bot commented Jul 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

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.

[Bug]: HarnessAgent注入的子agent是自行build出来的HarnessAgent,会默认注入自带的general-purpose

1 participant