v1.2.20:修复 fsmonitor 内存泄漏
发布日期:2026-03-06
🎯 一句话总结
修复 fsmonitor 守护进程导致的 60GB+ 内存泄漏问题,恢复终端输入兼容性。
🐛 重要修复:fsmonitor 内存泄漏
之前的问题
运行测试后,fsmonitor 守护进程未被正确清理,可能累积占用 60GB+ 的已提交内存。
现在的情况
修复了 fsmonitor 守护进程泄漏问题,进程退出时会正确清理资源。
⚠️ 如果你发现系统内存异常占用,升级后重启终端即可释放。
🔧 改进:Bun.which → npm which
这次更新了什么?
将 Bun.which 替换为 npm 的 which 包。
这有什么用?
提升跨平台兼容性,减少对 Bun 特有 API 的依赖。
🔧 改进:恢复终端输入
这次更新了什么?
恢复使用 Bun 的 stdin 读取实现(v1.2.19 的 Node.js stream 方案在某些终端有兼容性问题)。
这有什么用?
确保在所有终端环境下输入都正常工作。
📊 要不要升级?
| 情况 | 建议 |
|---|---|
| 遇到过内存异常占用 | ✅ 强烈推荐 |
| 所有用户 | ✅ 推荐 |
⬆️ 升级命令
bash
opencode upgrade📋 技术细节
点击展开原始 Release Notes
Core
- Stop leaking fsmonitor daemons that caused 60GB+ of committed memory after running tests
- Replace Bun.which with npm which in OpenCode
TUI
- Restore Bun stdin reads for prompt input

