makecindy / makecindy/cindy

协同模式长时间使用后 Lead→Worker 通道失效(send_to_worker 401 Session instance mismatch),无法向 Worker 回执

Open
#2,004 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
TypeScript
Stars
2.7k
Forks
395
Avg merge
21h 48m
Merged PRs (30d)
776

Description

**提交人**: 用户9200
**客户端版本**: 0.1.33

---

## 现象

在协同(Orca)模式下,长时间使用后出现单向通道失效:Worker→Lead 方向正常(Worker 消息仍能送达 Lead 会话),但 Lead→Worker 方向不可用,Lead 调用 `send_to_worker`、`get_workspace_info`、`list_workers` 等 Orca 工具全部返回 `HTTP 401: Session instance mismatch`,无法向 Worker 回执或派发新任务。该问题已多次复现。

## 复现步骤

1. 长时间使用协同(Orca)模式(数小时量级),期间主会话可能经历连接重连/恢复(日志可见 `Reconnecting...` 与 `thread resume`);
2. 之后 Lead 调用 `send_to_worker`、`get_workspace_info`、`list_workers` 等工具,即全部返回 `401 Session instance mismatch`;
3. Worker→Lead 方向仍正常,形成单向失效。

## 期望行为

Lead→Worker 方向应随主会话重连/恢复自动重建 MCP 会话绑定并恢复可用;若无法自动恢复,应给出明确的重连提示或提供手动重连入口,而不是静默失效。

## 实际行为

MCP 会话句柄未随主会话重建,导致 Lead→Worker 方向持续 401,需人工重启会话/应用才能恢复。
---
**版本区域**: CN
**OS**: win32 x64 (10.0.26100)
**界面语言**: zh-CN

Contributor guide

Open the contributing guide

Research direction

Start by tracing the send_to_worker, get_workspace_info, and list_workers entry points alongside the Reconnecting and thread resume flow. Inspect how the MCP session handle is bound and rebuilt after the main session reconnects. Done means Lead→Worker calls no longer return 401 after recovery, with a clear reconnect path if automatic recovery fails.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
authentication, backend-api-design, distributed-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.