What happened?
Running /review <pr> --comment (seen with /review 5096 --comment) on an OpenAI-compatible / DashScope (Aliyun Bailian) backend fails before it produces any review:
- Step 4 of the bundled
/review skill launches its 9 review agents in a single response (Agent 1 Correctness … Agent 7 Build & Test, with 6a/6b/6c personas).
- The model passes a
name argument to every spawn (agent1-correctness, agent2-security, …).
- Every spawn fails immediately:
Cannot spawn teammate "agent1-correctness": no active team.
Use team_create to start a team first, or omit "name" to launch a one-shot subagent.
- The model correctly notes it should drop
name ("I need to use one-shot subagents instead"), but instead of recovering it hallucinates that the never-started agents are "still running" / "standing by" and repeats the same tool call across consecutive rounds.
- The backend's repetitive-call guard then aborts the turn:
[API Error: <400> InternalError.Algo.InvalidParameter: Repetitive tool calls detected
in the conversation history. The same tool call with identical name and arguments has
been repeated across multiple consecutive rounds. ...]
Net effect: /review is unusable in this configuration — it never produces a review and burns the whole turn into a hard API error.
What did you expect to happen?
/review should launch its review agents as ordinary one-shot subagents and complete the review. At minimum, passing name when no team is active should degrade gracefully to a one-shot subagent (treating name as a label, with a warning) instead of hard-failing every spawn and cascading into a provider-side abort.
Client information
Client Information
Found during development on main (around commit 64a1efb20), macOS. To reproduce against a clean build, run qwen then /about and paste here:
$ qwen /about
# paste output here
Login information
OpenAI-compatible / DashScope (Aliyun Bailian) backend.
Anything else we need to know?
Root cause — an inconsistency introduced by #4844 (Agent Team)
- The Agent tool's
name parameter is advertised in the schema unconditionally (packages/core/src/tools/agent/agent.ts, initialSchema, ~L543), described as "spawn as a named teammate … requires an active team context."
- The team guidance that explains how to use it (call
team_create first) is gated behind isAgentTeamEnabled() (~L622). So the visibility of the param and the guidance for using it correctly are out of sync.
- Passing
name with no active team is a hard error (~L1639-1654), not a fallback.
- The bundled
/review skill (packages/core/src/skills/bundled/review/SKILL.md, Step 4) gives every review agent a name/number and tells the model to launch them all "in a single response". The model maps those names onto the name param. The skill has zero awareness of teams (no team_create step, no mention of name), and "all in one response" is structurally incompatible with "team_create must come first in a prior turn".
So the model is invited to fill name — by the always-present param, and (when agentTeam is enabled) actively pushed by the team guidance, which explicitly says "if the user asks for agents to review each other's work, or produce a consolidated result — create a team." That is exactly what /review is. But nothing makes the model call team_create first, and the failure is fatal instead of recoverable.
Reproduction conditions
/review <pr> --comment (or any /review invocation that reaches the multi-agent Step 4).
- Most reliable with
experimental.agentTeam: true / QWEN_CODE_ENABLE_AGENT_TEAM=1 (the team guidance steers the model toward named teammates). Can also occur with the flag off, because the name param is always in the schema and the skill names its agents.
- More likely on weaker models that do not self-recover from the per-call error.
Suggested directions (not prescriptive)
- Gate the
name param's schema visibility behind isAgentTeamEnabled(), matching the team-guidance gate — so the param disappears when teams are off.
- When
name is passed without an active team, fall back to a one-shot subagent + warning, instead of a hard error.
- Make
/review team-aware (insert a team_create step when teams are enabled) or explicitly instruct it to use one-shot agents without name.
- Optional: a runtime circuit-breaker on N consecutive identical tool calls, so a degenerate loop fails fast locally instead of relying on the provider's guard.
Related
What happened?
Running
/review <pr> --comment(seen with/review 5096 --comment) on an OpenAI-compatible / DashScope (Aliyun Bailian) backend fails before it produces any review:/reviewskill launches its 9 review agents in a single response (Agent 1 Correctness … Agent 7 Build & Test, with 6a/6b/6c personas).nameargument to every spawn (agent1-correctness,agent2-security, …).name("I need to use one-shot subagents instead"), but instead of recovering it hallucinates that the never-started agents are "still running" / "standing by" and repeats the same tool call across consecutive rounds.Net effect:
/reviewis unusable in this configuration — it never produces a review and burns the whole turn into a hard API error.What did you expect to happen?
/reviewshould launch its review agents as ordinary one-shot subagents and complete the review. At minimum, passingnamewhen no team is active should degrade gracefully to a one-shot subagent (treatingnameas a label, with a warning) instead of hard-failing every spawn and cascading into a provider-side abort.Client information
Client Information
Found during development on
main(around commit64a1efb20), macOS. To reproduce against a clean build, runqwenthen/aboutand paste here:Login information
OpenAI-compatible / DashScope (Aliyun Bailian) backend.
Anything else we need to know?
Root cause — an inconsistency introduced by #4844 (Agent Team)
nameparameter is advertised in the schema unconditionally (packages/core/src/tools/agent/agent.ts,initialSchema, ~L543), described as "spawn as a named teammate … requires an active team context."team_createfirst) is gated behindisAgentTeamEnabled()(~L622). So the visibility of the param and the guidance for using it correctly are out of sync.namewith no active team is a hard error (~L1639-1654), not a fallback./reviewskill (packages/core/src/skills/bundled/review/SKILL.md, Step 4) gives every review agent a name/number and tells the model to launch them all "in a single response". The model maps those names onto thenameparam. The skill has zero awareness of teams (noteam_createstep, no mention ofname), and "all in one response" is structurally incompatible with "team_create must come first in a prior turn".So the model is invited to fill
name— by the always-present param, and (whenagentTeamis enabled) actively pushed by the team guidance, which explicitly says "if the user asks for agents to review each other's work, or produce a consolidated result — create a team." That is exactly what/reviewis. But nothing makes the model callteam_createfirst, and the failure is fatal instead of recoverable.Reproduction conditions
/review <pr> --comment(or any/reviewinvocation that reaches the multi-agent Step 4).experimental.agentTeam: true/QWEN_CODE_ENABLE_AGENT_TEAM=1(the team guidance steers the model toward named teammates). Can also occur with the flag off, because thenameparam is always in the schema and the skill names its agents.Suggested directions (not prescriptive)
nameparam's schema visibility behindisAgentTeamEnabled(), matching the team-guidance gate — so the param disappears when teams are off.nameis passed without an active team, fall back to a one-shot subagent + warning, instead of a hard error./reviewteam-aware (insert ateam_createstep when teams are enabled) or explicitly instruct it to use one-shot agents withoutname.Related
/reviewcollision rather than long context.agent()orchestration) and is not involved.