makecindy / makecindy/cindy

原生 subagent 读取会话工作目录外的 sibling 仓库时挂起至 600 秒超时

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

Description

**客户端版本**: 0.1.46
**反馈类型**: bug

---

## 现象

Pi 原生 `scout`、`reviewer`、`planner` subagent 本身可以启动,也能读取当前会话工作目录中的文件;但只要任务要求读取同级的另一个仓库,即使只读一个很小的源文件,也会一直挂起,并在固定 600 秒后返回统一超时。

## 复现步骤

1. 在 Cindy 中打开一个仓库 `parent-repo`,以该目录启动 Pi 会话。
2. 调用 `scout`,只要求读取 `parent-repo/AGENTS.md` 并返回一句摘要;任务正常完成。
3. 再调用同一个 `scout`,只要求读取绝对路径指向的 `sibling-repo/src/example.ts`;不要求搜索、构建或修改。
4. 等待 600 秒。
5. 任务返回 `subagent timed out after 600s`。

`reviewer` 的历史跨仓库任务也呈现相同行为;三个角色的纯文本最小探针和当前目录读取均能成功。

## 期望行为

Full Access 会话中,subagent 应能读取父会话可访问的 sibling 仓库;如果产品有意限制 subagent 的文件根目录,则应立即返回明确、结构化的路径越界错误,并提示切换工作目录,而不是等待 10 分钟。

## 实际行为

外部单文件读取没有快速成功或失败,最终只返回统一的 600 秒超时。父会话无法看到子进程最后一次工具调用、底层读取错误或 stderr 摘要,因此很容易误判为所有 subagent、模型或 provider 失效。

## 复现频率

已观察到 5/5:4 次真实跨仓库调查任务,加 1 次仅读取单个外部文件的最小复现。当前工作目录内的对照任务均成功。

## 已尝试

- 验证 `scout`、`reviewer`、`planner` 均可正常启动并完成纯文本探针。
- 验证当前工作目录内的 `read` 任务成功。
- 验证模型和 provider 路由可用。
- 验证父会话处于 `bypassPermissions` / Full Access,不是等待授权确认卡。
- 将失败任务缩小到只读 sibling 仓库中的一个文件,仍精确超时 600 秒。
- 确认 Orca Worker 未开启与此无关;问题发生在 Pi 原生 subagent。

## 诊断线索

运行期生成的 subagent 扩展会用父会话的 `process.cwd()` 启动每个只读 Pi 子进程,任务 schema 没有独立 `cwd` 或只读根目录参数;同时设置了固定的 `10 * 60 * 1000` 超时。建议检查父会话授权根是否正确传递给子进程、内置只读工具对 cwd 外路径的处理,以及超时错误是否能保留最后工具调用与底层错误摘要。
---
**OS**: darwin arm64 (25.6.0)
**界面语言**: zh-CN

Contributor guide

Open the contributing guide

Research direction

Start by locating the runtime-generated subagent extension and the child-process launch path that uses process.cwd(), then inspect the fixed 10 * 60 * 1000 timeout and authorization-root handling. Reproduce the sibling-repository read and compare it with an in-workspace read; done means the read succeeds or returns an immediate structured path error, with the last tool call and underlying error summary preserved.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.