makecindy / makecindy/cindy

智能体将打包版 Cindy 当作 Node 执行时反复触发误导性的 macOS 崩溃报告

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

Description

**提交人**: ChenerX2
**客户端版本**: 0.1.25

---

## 现象

Cindy 主程序正常运行、当前任务也仍在继续时,macOS 会反复弹出“Cindy 意外退出”。核对系统崩溃报告与会话命令后发现,退出的并非正在使用的主实例,而是智能体误把打包后的 Cindy/Helper 可执行文件当作 Node 启动后产生的短命第二实例。

2026-07-30 至 2026-08-01 共发现 10 份 Cindy 主程序崩溃报告,涉及 0.1.21~0.1.23,另有数份 Helper 报告。主报告均在启动不到 1 秒时出现 `EXC_CRASH (SIGABRT)`,调用栈包含 `_RegisterApplication`;其中 8 份可与会话中的误调用命令精确对应。

## 复现步骤

1. 正常启动 Cindy,并保持主实例运行。
2. 从智能体终端把应用程序可执行文件当作 Node 调用,例如:

```sh
ELECTRON_RUN_AS_NODE=1 /Applications/Cindy.app/Contents/MacOS/Cindy --version
```

或使用 `-p "process.versions"`,以及直接调用 Cindy Helper/Helper Plugin 可执行文件。
3. 正式包已关闭 Electron `RunAsNode` fuse,环境变量不会让该程序进入 Node 模式;系统实际启动了另一个 GUI 应用进程。
4. 新进程在 macOS 应用注册阶段异常终止并产生“Cindy 意外退出”报告,原 Cindy 主实例继续运行。

## 期望行为

- 智能体、命令执行层或官方运行时入口应识别并拒绝把打包版 Cindy/Helper 当作 Node 执行。
- 应提供明确、安全的 Node/插件测试运行时入口,避免智能体自行猜测应用程序路径。
- 误调用时返回可理解的诊断信息,不应启动第二个 GUI 实例或产生系统崩溃报告。

## 实际行为

短命第二实例以 `SIGABRT` 或 Helper 的 `SIGTRAP` 退出,macOS 将其显示为 Cindy 崩溃,用户容易误以为正在使用的主程序不稳定;同时会反复污染系统崩溃记录。

## 初步判断与建议

关闭 `RunAsNode` 是正式包已有的安全设计,不建议重新开启。更合适的修复方向可能包括:

- 在智能体命令策略中拦截对 `Cindy.app/Contents/MacOS/Cindy` 及 Helper 的 Node 参数调用;
- 暴露并文档化官方安全运行时或检测命令;
- 向智能体注入“不得把打包版 Electron 应用当作 Node”的明确约束;
- 增加覆盖上述误调用的回归测试。

已检索开放、关闭及合并的 Issue/PR,暂未发现相同问题。
---
**版本区域**: CN
**OS**: darwin arm64 (25.5.0)
**界面语言**: zh-CN

Contributor guide

Open the contributing guide

Research direction

Start with the agent command policy or command-execution path and the packaged executable paths named in the report: /Applications/Cindy.app/Contents/MacOS/Cindy and the Cindy Helper/Helper Plugin binaries. Reproduce the ELECTRON_RUN_AS_NODE=1 and -p invocations, then verify that invalid calls are rejected with a clear diagnostic, no second GUI instance starts, and regression coverage protects the behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
electron, macos, node.js, typescript
Domain
cli, desktop, devtools, security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.