fix: 修复并发会话串群 Bug — 用 ContextVar 替换 _current_route_ctx
AgentHub._current_route_ctx 是单例上的共享实例属性,并发请求在 agent.reply() yield 点后相互覆盖,导致子Agent 回复发到错误房间。 用 contextvars.ContextVar 替换,每个 asyncio Task 持有独立上下文。 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Showing
3 changed files
with
13 additions
and
8 deletions
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
-
Please register or sign in to post a comment