Skip to content

fix(acp): improve error message when CLI exits with code 0 during ACP startup#1943

Merged
piorpua merged 1 commit intomainfrom
fix/issue-1904
Mar 30, 2026
Merged

fix(acp): improve error message when CLI exits with code 0 during ACP startup#1943
piorpua merged 1 commit intomainfrom
fix/issue-1904

Conversation

@kaizhou-lab
Copy link
Copy Markdown
Collaborator

Summary

  • When a CLI (e.g. Qwen Code v0.13.1) exits with code 0 and no stderr during ACP startup, the error message now clearly states the CLI version may not support ACP mode and suggests upgrading
  • Previously the message was a generic "process exited during startup (code: 0, signal: null)" which gave no actionable guidance

Related Issues

Closes #1904

Test Plan

  • Unit tests added for all three exit scenarios (code 0 no stderr, code 0 with stderr, code non-zero)
  • Type check passes
  • Lint and format pass

… startup

When a CLI (e.g. Qwen Code v0.13.1) exits with code 0 and no stderr
during ACP startup, it strongly suggests the CLI version does not
support ACP mode. The previous generic message was unhelpful.

Now the error clearly states the version may not support ACP and
suggests upgrading.
@kaizhou-lab kaizhou-lab mentioned this pull request Mar 30, 2026
@piorpua piorpua added the bot:reviewing Review in progress (mutex) label Mar 30, 2026
@piorpua
Copy link
Copy Markdown
Contributor

piorpua commented Mar 30, 2026

Code Review:fix(acp): improve error message when CLI exits with code 0 during ACP startup (#1943)

变更概述

本 PR 在 AcpConnection.ts 的 ACP 启动退出处理逻辑中,针对"进程以 code 0 退出且无 stderr"场景新增了一条具体的错误提示,引导用户升级 CLI 版本。同时新增了覆盖三个退出场景的单元测试文件 acpConnectionStartupExit.test.ts


方案评估

结论:✅ 方案合理

改动准确定位到 exit 事件处理逻辑中 if-else 链的正确位置(stderrCombined 为空且 code === 0),不影响其他分支(有 stderr、非 0 退出码)。错误信息通过 processExitReject 传播,与现有架构一致。方案简洁,没有引入不必要的复杂度。


问题清单

未发现明显问题。三条 lint warning(os 未使用导入、两处 catch 参数)均为预存问题,本次 PR 未引入。


汇总

# 严重级别 文件 问题
无问题

结论

批准合并 — 改动最小且精准,测试覆盖完整,无阻塞性问题。


本报告由本地 pr-review skill 生成,包含完整项目上下文,无截断限制。

CONCLUSION: APPROVED
IS_CRITICAL_PATH: false
PR_NUMBER: 1943

@piorpua
Copy link
Copy Markdown
Contributor

piorpua commented Mar 30, 2026

✅ 已自动 review,无阻塞性问题,正在触发自动合并。

@piorpua piorpua merged commit 684fa82 into main Mar 30, 2026
17 checks passed
@piorpua piorpua deleted the fix/issue-1904 branch March 30, 2026 12:03
@piorpua piorpua added bot:done Auto-merged by bot and removed bot:reviewing Review in progress (mutex) labels Mar 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bot:done Auto-merged by bot

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]:

2 participants