Skip to content

fix(agent): guard team creation against duplicate relationship replies - #1010

Open
RerankerGuo wants to merge 3 commits into
agentscope-ai:mainfrom
RerankerGuo:fix/issue-987-team-create-idempotency-clean
Open

fix(agent): guard team creation against duplicate relationship replies#1010
RerankerGuo wants to merge 3 commits into
agentscope-ai:mainfrom
RerankerGuo:fix/issue-987-team-create-idempotency-clean

Conversation

@RerankerGuo

@RerankerGuo RerankerGuo commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Treat Team/Leader/Worker relationship questions as read-only in the Manager Team Management skill.
  • Require hiclaw get team <TEAM_NAME> -o json before hiclaw create team.
  • Add a changelog entry for the Manager guardrail.

Why

Fixes #987. The reported flow asks the Manager to explain an existing Team, Leader DM, and Worker relationship, but the Manager can interpret that as another team creation request. The new guidance makes relationship explanation read-only and makes duplicate creation checks explicit.

Temporary dependencies

This branch is temporarily stacked on #985 and #1015. Its previous CI failure
was SHARD_D/test-21: the Leader kept working in its DM instead of coordinating
in the Team Room. #1015 fixes that behavior and now passes all 10 integration
matrix jobs; #1015 itself uses #985 for deterministic SHARD_A setup.

Relative to #1015, this PR still changes only:

  • changelog/current.md
  • manager/agent/skills/team-management/SKILL.md
  • manager/agent/skills/team-management/references/create-team.md

After the dependency PRs merge, this PR automatically reduces to those files.

Validation

Local runtime reproduction was not run because this is an agent-facing built-in instruction change and the local Docker socket is not accessible in this environment.

@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

📊 CI Metrics Report

Summary

Metric Current Baseline Change
LLM Calls 134 81 +53 ↑ +65.4%
Input Tokens 4383203 2803871 +1579332 ↑ +56.3%
Output Tokens 30929 16791 +14138 ↑ +84.2%
Total Tokens 4414132 2820662 +1593470 ↑ +56.5%

By Role

Role Metric Current Baseline Change
🧠 Manager LLM Calls 78 68 +10 ↑ +14.7%
Input Tokens 2845207 2502214 +342993 ↑ +13.7%
Output Tokens 16809 13725 +3084 ↑ +22.5%
Total Tokens 2862016 2515939 +346077 ↑ +13.8%
🔧 Workers LLM Calls 56 13 +43 ↑ +330.8%
Input Tokens 1537996 301657 +1236339 ↑ +409.8%
Output Tokens 14120 3066 +11054 ↑ +360.5%
Total Tokens 1552116 304723 +1247393 ↑ +409.4%

Per-Test Breakdown

Test Mgr Calls Wkr Calls Δ Calls Mgr In Wkr In Mgr Out Wkr Out Δ Tokens Trend
02-create-worker 7 0 -5 ↓ -41.7% 212013 0 792 0 -145817 ↓ -40.7% ✅ improved
03-assign-task 13 9 +7 ↑ +46.7% 406680 213326 1960 1422 +149732 ↑ +31.6% ⚠️ regressed
04-human-intervene 16 0 +3 ↑ +23.1% 480282 0 2780 0 +50064 ↑ +11.6% ⚠️ regressed
05-heartbeat 9 0 +2 ↑ +28.6% 317565 0 1846 0 +44159 ↑ +16.0% ⚠️ regressed
06-multi-worker 33 47 +46 ↑ +135.3% 1428667 1324670 9431 12698 +1495332 ↑ +116.8% ⚠️ regressed

Trends

1 test(s) improved (fewer LLM calls)
⚠️ 4 test(s) regressed (more LLM calls)


Generated by HiClaw CI on 2026-07-13 14:38:05 UTC


📦 Download debug logs & test artifacts

@RerankerGuo
RerankerGuo marked this pull request as ready for review July 9, 2026 14:26
@RerankerGuo
RerankerGuo force-pushed the fix/issue-987-team-create-idempotency-clean branch from 5231bf0 to 0b4a89c Compare July 10, 2026 02:16
@github-actions

Copy link
Copy Markdown
Contributor

❌ Integration Tests Failed (controller-cr-2 / mgr=copaw / wk=copaw)

Commit: 0b4a89c
Workflow run: #1530

Test Results
No test output captured.
Debug Log (tail)
No debug logs available.

📦 Download full debug logs & test artifacts

@RerankerGuo
RerankerGuo force-pushed the fix/issue-987-team-create-idempotency-clean branch from 0b4a89c to 607e232 Compare July 13, 2026 13:20
@RerankerGuo
RerankerGuo force-pushed the fix/issue-987-team-create-idempotency-clean branch from 607e232 to 1977bb7 Compare July 13, 2026 13:32
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.

1 participant