What broke when my Claude Code projects started talking to each other
说明与用途
Claude Code 项目间交互出现权限、信任、安全、静默挂起和地址错误问题。解决方案包括预先批准工具、禁止 shell、隔离、持续信任决策、显式指定模型以及按名称重新发现会话。
问题
Cross‑project Claude Code sessions stalled or failed due to permission prompts, trust decisions, model safety rejections, silent stalls, addressing bugs, and read‑only transport limitations.
结果
The mitigations allow reliable cross‑project question/answer delivery, but full cross‑tree modification remains untested. The main failures now stem from permission, trust, safety, and addressing issues rather than transport bugs.
工作流
- 1. Pre‑approve read‑only tools at launch to avoid permission dialogs.
- 2. Forbid shell usage in request payloads to prevent silent hangs.
- 3. Enforce confinement so sessions cannot access files outside their tree.
- 4. Set standing trust decisions for unapproved MCP servers to avoid startup stalls.
- 5. Explicitly pass the model when launching background sessions to prevent quota‑related silent deaths.
- 6. Re‑discover session by current name before messaging to avoid addressing bugs.
- 7. Monitor session logs to distinguish idle, still‑working, and stalled states.
证据
Pre‑approving read‑only tools at launch and forbidding shell use in the request itself, sub‑agents included, cures the shell class.
Re‑verified on 2.1.252: cross‑session delivery and typed message exchange still work as described.
The workaround is small: re‑discover a session by its current name before any follow‑up message.
- 记录日期: 2026-09-05T19:00:02.597Z