QWEN.md 多 agent 禁令被系统默认 Explore 指引覆盖
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 28k
- Forks
- 3.1k
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 714
Description
What happened?
这是主代理违反了 QWEN.md 规则,不是规则没生效。原因有三层:
1. 规则确实存在且清晰
你的 ~/.qwen/QWEN.md 里写得很明确:
│ 默认不使用多agent;仅当用户明确要求 subagent、委派或并行 Agent 时启用,不为简单任务增加额外用量。
而你的原话只是"再次分析一下付款失败相关逻辑是否还有需要补充优化的"——既没说 subagent,也没说委派/并行。按规则就不该 spawn。
2. 为什么还是 spawn 了——系统提示的默认倾向压过了 QWEN.md
Qwen Code 的内置系统提示里有几条很强的默认指引:
│ For broader codebase exploration and deep research, use the 'agent' tool with subagent_type=Explore.
│ Agent 工具说明里也鼓励"复杂多步任务自主处理"。
模型在权衡时,把"全仓库审计 PayFail 逻辑"判定成了"broad exploration → 该用 Explore",没有先回头检查 QWEN.md 的禁用约束。这是典型的系统默认行为盖过用户级 rule 的失败案例,不是规则被忽略,而是权重排序错了。
3. 还有一个加重因素
"再次分析"+"是否还有补充优化"是一个开放式、全仓库扫描型问题,正好命中 Explore 子代理的描述触发词("multi-step"、"broad codebase")。模型走捷径直接委派,而不是自己用 grep_search/read_file 串行做完。
---
What did you expect to happen?
遵守QWEN.md约定,不要被系统默认指引覆盖
Client information
Qwen Code: 0.20.1 (305b04910)
Runtime: Node.js v22.23.1 / npm 11.13.0
LSP: disabled
OS: darwin arm64 (24.6.0)
Auth: API Key - anthropic
Base URL: http://127.0.0.1:4000
Model: Peach-07-17-DogFooding-litellm
Fast Model: anthropic:Peach-07-17-DogFooding-litellm
Session ID: 07a97941-6081-42d4-b6df-f3c844c70f4c
Sandbox: no sandbox
Proxy: no proxy
Memory Usage: 178.7 MB
Login information
No response
Anything else we need to know?
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing how QWEN.md rules and the built-in system prompt are assembled, then inspect the agent tool's Explore guidance and reproduce the supplied "再次分析" scenario. Done means a user-level prohibition on multi-agent use is honored instead of being overridden by the default exploration guidance.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- node.js, typescript
- Domain
- ai, cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100