agentscope-ai / agentscope-ai/QwenPaw
[Bug]: Repeated MCP client registration with list_tools() leads to task cancellation
- Lenguaje dominante
- Python
- Estrellas
- 34.9k
- Forks
- 3.1k
- Merge medio
- 1 d 15 h
- PR fusionados (30 d)
- 225
Descripción
## CoPaw Version
1.0.2b1
## Description
每次发送聊天请求时,query_handler() 都会创建新的 CoPawAgent 实例并调用 register_mcp_clients()。这导致每次请求都要通过 list_tools() 重新连接 MCP 服务器获取工具列表。当 MCP 服务器响应较慢时,list_tools() 的等待过程容易被外部取消,引发 CancelledError 导致任务失败。
## Component(s) Affected
- Core / Backend (app, agents, config, providers, utils, local_models)
- Console (frontend web UI)
- Channels (DingTalk, Feishu, QQ, Discord, iMessage, etc.)
- Skills
- CLI
- Documentation (website)
- Tests
- CI/CD
- Scripts / Deploy
## Environment
- **CoPaw version:** 1.0.2b1
- **OS:** Windows 11
- **Install method:** from source
- **Python version 3,12
## Steps to Reproduce
启动应用并测试:
1. 配置 MCP 客户端
2. 发送多次聊天请求
3. 验证不再出现 CancelledError
Guía de contribución
Evaluación
Este issue todavía no se ha evaluado.