claude-code-best/packages
IronRookieCoder 1a85db7ca8 fix(bash): wake foreground task after auto-backgrounding
## Bug 详情
用户升级 4.0.16 后,使用过程中 CLI 会话可能一直处于 busy 状态,表现为无法继续输入且没有响应。

## 根因
BashTool 的长命令在已经注册为 foreground task 后被自动后台化时,只设置了 backgroundShellId,但没有唤醒正在等待 progress/result 的 generator。若命令无输出或轮询没有再次触发,主 REPL 会继续等待,输入循环无法释放。

## 修复方案
在 foreground task 自动后台化成功后,立即 resolve 当前 progress 等待器,让 runShellCommand 能观察到 backgroundShellId 并返回后台任务结果。

## 变更要点
- 在 BashTool foreground auto-background 路径补齐 resolveProgress 唤醒逻辑
- 保持已有 spawnBackgroundTask 路径的唤醒行为一致

## 自测
- bun test packages/builtin-tools/src/tools/BashTool/__tests__ 通过
- bun run typecheck 当前仍有仓库既有无关错误,未涉及本次变更
2026-05-14 13:21:58 +08:00
..
@ant chore: 合并社区 upstream/main 代码至 v2.4.2 2026-05-12 11:55:04 +08:00
acp-link style: 完成所有文件的lint 2026-05-01 21:39:30 +08:00
agent-tools style: 完成所有文件的lint 2026-05-01 21:39:30 +08:00
audio-capture-napi style: 完成所有文件的lint 2026-05-01 21:39:30 +08:00
builtin-tools fix(bash): wake foreground task after auto-backgrounding 2026-05-14 13:21:58 +08:00
color-diff-napi style: 完成所有文件的lint 2026-05-01 21:39:30 +08:00
image-processor-napi style: 完成所有文件的lint 2026-05-01 21:39:30 +08:00
mcp-client fix: 优化内存峰值与 CPU 性能,降低 100-300MB 内存占用 2026-05-02 00:45:03 +08:00
modifiers-napi style: 完成所有文件的lint 2026-05-01 21:39:30 +08:00
remote-control-server chore: 合并社区 upstream/main 代码至 v2.4.2 2026-05-12 11:55:04 +08:00
url-handler-napi style: 完成所有文件的lint 2026-05-01 21:39:30 +08:00
weixin style: 完成所有文件的lint 2026-05-01 21:39:30 +08:00
tsconfig.json feat: 重构供应商层次 (#286) 2026-04-17 09:33:14 +08:00