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
dsh web 同进程第二个 cordis 预设会话挂载失败:Host Cordis inspect provider "Service" is already registered
#2939
Duplicate of #1415 (canonical thread with the full analysis and independent verifications — my supplementary rc.7 reproduction is posted there: #1415 (comment)). Keeping this short note instead of a full repost.*
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Duplicate of #1415 (canonical thread with the full analysis and independent verifications — my supplementary rc.7 reproduction is posted there: #1415 (comment)). Keeping this short note instead of a full repost.*
环境
0.1.0-rc.7(npx -y @deepseek-ai/dsh web),macOS (arm64),Node v22cordis预设(config/agent-presets/cordis/agent.cordis.yml)现象
dsh web 进程里已有一个 cordis 预设会话挂载时,resume 第二个 cordis 预设会话会直接失败:
复现步骤
npx -y @deepseek-ai/dsh webtool-cordis行挂载失败,resume 请求被整体拒绝根因定位(顺着报错栈读到的代码)
@deepseek-ai/dsh-tool-cordis的apply(ctx)在每次挂载时都会执行:注册 id 硬编码为
Service/Event/Builtin/Tool四个 Host inspect provider(hostInspectProviders())。CordisInspectRegistryService(@deepseek-ai/dsh-cordis-host-runner)是进程级单例(类注释 "Register the process-global Host registry"),register()对已存在的 id 直接 throw:因此同一 dsh web 进程内,第二个 cordis 预设会话的挂载必然撞在
Service上。内置 cordis 预设的
agent.cordis.yml对 subagent setup 注释了同类单例语义("one copy per mounted preset ... which throws on the second"),说明这类单例语义是已知设计,但 inspect provider 这条路径没有对应的多会话防护。佐证
重启 dsh web 后,同一会话、同一预设的 resume 立即恢复正常——说明问题在进程内注册表状态,与会话文件、预设内容无关。另外,被拒的 resume 不会写会话日志(挂载失败发生在日志追加之前),用户侧看起来像"这个会话坏了",实际重启宿主即可恢复。
影响
经常用 cordis 预设做组合开发的用户,历史会话攒多之后,任意一个 cordis 会话先被挂载,其余 cordis 会话的 resume 都会失败,只能重启 dsh web 清空注册表。
期望
dsh web 是多会话并存的界面,希望能支持同进程多个 cordis 预设会话挂载(注册共享 / 引用计数 / 按 scope 隔离均可);若短期不改动,也建议在挂载失败时给用户明确提示(例如"同一时刻仅支持一个 cordis 会话挂载"),代替当前的 internal error。
All reactions