Skip to content

fix(manager): stop repeated diagnostic loops#975

Open
RerankerGuo wants to merge 2 commits into
agentscope-ai:mainfrom
RerankerGuo:fix/issue-974-manager-diagnostic-loop
Open

fix(manager): stop repeated diagnostic loops#975
RerankerGuo wants to merge 2 commits into
agentscope-ai:mainfrom
RerankerGuo:fix/issue-974-manager-diagnostic-loop

Conversation

@RerankerGuo

@RerankerGuo RerankerGuo commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add Manager prompt safeguards against repeating the same no-op or malformed troubleshooting command
  • define Worker deletion completion as the target disappearing from hiclaw get workers
  • update worker lifecycle guidance to avoid looping on Matrix room probes such as copaw channels list after deletion

Fixes #974.

Tests

  • git diff --check
  • rg -n "Diagnostic loop safeguard|Worker deletion is complete|Delete Completion Boundary|Stop repeated diagnostics" manager/agent/AGENTS.md manager/agent/copaw-manager-agent/AGENTS.md manager/agent/skills/worker-management/references/lifecycle.md manager/agent/skills/worker-management/SKILL.md

Temporary dependency

@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

📊 CI Metrics Report

Summary

Metric Current Baseline Change
LLM Calls 95 81 +14 ↑ +17.3%
Input Tokens 2982071 2803871 +178200 ↑ +6.4%
Output Tokens 19839 16791 +3048 ↑ +18.2%
Total Tokens 3001910 2820662 +181248 ↑ +6.4%

By Role

Role Metric Current Baseline Change
🧠 Manager LLM Calls 82 68 +14 ↑ +20.6%
Input Tokens 2702276 2502214 +200062 ↑ +8.0%
Output Tokens 17398 13725 +3673 ↑ +26.8%
Total Tokens 2719674 2515939 +203735 ↑ +8.1%
🔧 Workers LLM Calls 13 13 0 — 0%
Input Tokens 279795 301657 -21862 ↓ -7.2%
Output Tokens 2441 3066 -625 ↓ -20.4%
Total Tokens 282236 304723 -22487 ↓ -7.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% 186447 0 862 0 -171313 ↓ -47.8% ✅ improved
03-assign-task 11 6 +2 ↑ +13.3% 303434 115858 2262 851 -51251 ↓ -10.8% ⚠️ regressed
04-human-intervene 18 0 +5 ↑ +38.5% 468392 0 2872 0 +38266 ↑ +8.8% ⚠️ regressed
05-heartbeat 9 0 +2 ↑ +28.6% 290119 0 1863 0 +16730 ↑ +6.1% ⚠️ regressed
06-multi-worker 37 7 +10 ↑ +29.4% 1453884 163937 9539 1590 +348816 ↑ +27.2% ⚠️ regressed

Trends

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


Generated by HiClaw CI on 2026-07-13 16:03:01 UTC


📦 Download debug logs & test artifacts

@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

❌ Integration Tests Failed (llm-interaction / mgr=copaw / wk=hermes)

Commit: 38e4c45
Workflow run: #1503

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-974-manager-diagnostic-loop branch from 25b153e to 38e4c45 Compare July 8, 2026 05:47
@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

❌ Integration Tests Failed (llm-interaction / mgr=copaw / wk=copaw)

Commit: 38e4c45
Workflow run: #1503

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

📦 Download full debug logs & test artifacts

@RerankerGuo

Copy link
Copy Markdown
Contributor Author

@shiyiyue1102 Hi! Both SHARD_A copaw/copaw and copaw/hermes failed. Same pattern as #984 — in the copaw/hermes case the hiclaw-worker-bob session directory does not exist at all and Manager never invoked hiclaw create worker --name bob — Manager only created alice. The copaw/copaw failure is similar (bob got created but a downstream assertion failed). The failure mode is a test-prompt interpretation flake, not anything in this PR's Manager prompt + worker-management guidance changes.

This PR is docs-only + prompt guidance; it doesn't touch runtime code paths. Could you re-run CI or merge if you agree the flake is unrelated?

@RerankerGuo RerankerGuo force-pushed the fix/issue-974-manager-diagnostic-loop branch from 38e4c45 to 90c9fd4 Compare July 13, 2026 14:51
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.

简单的使用就会陷入死循环,很慢 || Simple use will cause an infinite loop, which is very slow

1 participant