Skip to content

Prevent duplicate team creation from informational queries - #1102

Open
RerankerGuo wants to merge 1 commit into
agentscope-ai:mainfrom
RerankerGuo:fix/issue-987-prevent-duplicate-team-creation
Open

Prevent duplicate team creation from informational queries#1102
RerankerGuo wants to merge 1 commit into
agentscope-ai:mainfrom
RerankerGuo:fix/issue-987-prevent-duplicate-team-creation

Conversation

@RerankerGuo

Copy link
Copy Markdown
Contributor

Summary

  • Bug fix: Manager incorrectly created duplicate teams when asked about team relationships
  • Root cause: No guardrail in team-management skill to distinguish informational queries from explicit creation requests
  • Fix: Added guardrails in SKILL.md + duplicate name detection in create-team.sh

Changes

  • manager/agent/skills/team-management/SKILL.md: Added ⚠️ Informational Queries section with explicit rules against creating/modifying teams in response to questions. Added pre-flight check example. Added duplicate creation reminder in Gotchas.
  • manager/agent/skills/team-management/scripts/create-team.sh: Added duplicate name detection that fails fast with a clear error message if a team with the same name already exists
  • changelog/current.md: Added changelog entry

Test plan

  • Shell syntax validation (bash -n)
  • CI run on GitHub
  • Manual: ask Manager about team relationships, verify no duplicate creation

Closes #987

When the admin asks about team relationships (e.g. 'what's the relationship
between Team X, Leader Y, and Worker Z?'), the Manager was incorrectly
interpreting the question as a creation request and spinning up duplicate
teams.

Fix:
- Added explicit guardrails in team-management SKILL.md distinguishing
  informational queries from creation requests
- Added pre-flight duplicate name detection in create-team.sh to fail-fast
  if a team with the same name already exists
- Updated Gotchas section with explicit anti-duplicate reminder

Closes agentscope-ai#987
@gemini-code-assist

Copy link
Copy Markdown

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

@RerankerGuo
RerankerGuo force-pushed the fix/issue-987-prevent-duplicate-team-creation branch from d0f6d16 to 797cb05 Compare July 30, 2026 00:53
@shiyiyue1102

Copy link
Copy Markdown
Collaborator

Thanks for the fix. The informational-query guardrail is aligned with #987, but a few issues need to be addressed before merging:

  1. The new duplicate-team error suggests agt get team, while the registered CLI command is agt get teams <name> -o json. Running the suggested singular form only prints the generic agt get help and does not inspect the Team.
  2. Please add focused tests for the duplicate check, including existing, missing, and list-command failure cases.
  3. Please align the documented condition with the example: the text says name + leader + workers, while the jq expression checks worker list OR leader and does not compare the name.
  4. This PR currently conflicts with main in changelog/current.md; please resolve the conflict.

感谢修复。针对信息查询增加防误创建规则的方向与 #987 一致,但合并前还需要处理:

  1. 新增报错提示使用了 agt get team,实际注册的命令是 agt get teams <name> -o json。执行提示中的单数形式只会输出通用的 agt get 帮助,不会查询 Team。
  2. 请为重复检查补充针对性测试,覆盖已存在、不存在以及列表查询失败。
  3. 请统一文档和示例的判断条件:文字是 name + leader + workers,jq 示例却是 worker 列表或 leader,且没有比较 name。
  4. 当前 PR 与 mainchangelog/current.md 存在冲突,请先解决。

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.

manager给我建了2套一样的团队 || The manager created 2 sets of the same team for me.

2 participants