You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]:AgentScope 2.0 GA 单例 Agent 并发时工具组跨会话串扰 #2439
I reproduced this with a deterministic concurrent-session regression test: two sessions loaded with different active tool groups overwrite one another through the shared Toolkit state. I am working on a fix that keeps tool-group activation and persistence scoped to each call/session, including runtime group changes, and will add the regression test to the PR.
Confirmed still present on 2.0.3, reproduced deterministically with a HarnessAgent singleton, a Redis AgentStateStore and AG-UI.
Steps: session B's model call is blocked mid-turn. Meanwhile session A activates a META group via reset_equipped_tools, then B is released. B's end-of-call save runs syncToolkitToState, which persists the shared toolkit's active groups, including A's group, into B's state. On B's next turn, the group's tools appear in B's tool list, although B never activated it.
Tool-schema selection per call already uses state.getToolContext().getActivatedGroups(), so the leak comes in through persistence. ToolExecutor's availability check also reads the shared toolkit (Unauthorized tool call: ... is not available), which suggests a concurrent session can also make a legitimately activated tool unavailable.
Activity
logicwu0 commentedon Jul 28, 2026
I reproduced this with a deterministic concurrent-session regression test: two sessions loaded with different active tool groups overwrite one another through the shared Toolkit state. I am working on a fix that keeps tool-group activation and persistence scoped to each call/session, including runtime group changes, and will add the regression test to the PR.
oss-maintainer commentedon Jul 28, 2026
fix(tools): isolate request tool views and session skill resources (#…
xuchaoguo1983 commentedon Sep 26, 2026
Confirmed still present on 2.0.3, reproduced deterministically with a
HarnessAgentsingleton, a RedisAgentStateStoreand AG-UI.Steps: session B's model call is blocked mid-turn. Meanwhile session A activates a META group via
reset_equipped_tools, then B is released. B's end-of-call save runssyncToolkitToState, which persists the shared toolkit's active groups, including A's group, into B's state. On B's next turn, the group's tools appear in B's tool list, although B never activated it.Tool-schema selection per call already uses
state.getToolContext().getActivatedGroups(), so the leak comes in through persistence.ToolExecutor's availability check also reads the shared toolkit (Unauthorized tool call: ... is not available), which suggests a concurrent session can also make a legitimately activated tool unavailable.xzxiaoshan commentedon Oct 9, 2026
complated as v2.0.4