the engine have stopped error in v0.8.50 still
Thanks @Artenx for the report.
This repository is currently observing a maintainer-managed contribution gate in dry-run mode, so this issue is staying open. When enforcement is enabled, issues from contributors who are not listed in .github/APPROVED_CONTRIBUTORS will be closed automatically.
Please read CONTRIBUTING.md for the expected issue shape. A maintainer can grant issue access by commenting /lgtmi on an issue.
导致 "Turn stalled" 的原因应该是 engine 在 turn 中途意外退出了。有两种方式能确认具体原因:
方法一:看崩溃报告(推荐,不需要复现)
每次 engine 崩溃时都会自动保存一个报告文件。打开终端,跑:
ls ~/.codewhale/crashes/
如果有文件,跑这个查看内容(找类似文件名的文件,把文件名换成实际的):
cat ~/.codewhale/crashes/{时间戳}-engine-event-loop.log
把内容发到这里,就能知道具体是哪行代码崩了。
如果没有这个目录或文件,说明 engine 可能不是代码崩溃,而是被系统kill掉的(比如内存不足 OOM)。
方法二:看日志(需要再复现一次)
先设置环境变量再启动:
RUST_LOG=panic=trace codewhale
正常使用直到 "Turn stalled" 再次出现。然后退出程序,在终端输出里找包含下面关键字的行:
ERROR panic: Task 'engine-event-loop' panicked at
如果能找到,把那一行和它附近的几行发出来。
Hardened on the v0.8.51 branch (claude/busy-mayer-b66rA, commit 5249723).
What was happening: a panic inside the turn loop unwound through engine.run() and was caught by spawn_supervised("engine-event-loop"), which wrote the crash dump and let the entire engine task exit. The UI never received TurnComplete, so it sat on "working"/"Turn stalled" forever, and every later turn was dead too — matching "the engine have stopped".
Fix: the turn call is now wrapped in catch_unwind. A panic surfaces as a failed TurnComplete with an actionable message instead of killing the loop, and the engine stays alive for the next turn. The crash dump is still written to ~/.codewhale/crashes/.
Leaving this open until you can confirm on v0.8.51, because "engine have stopped" can also be the OS killing the engine (e.g. OOM), which this fix can't prevent. If it recurs after upgrading, please attach ~/.codewhale/crashes/<timestamp>-engine-event-loop.log (or run with RUST_LOG=panic=trace) so we can see whether it's a panic (now recovered) or an external kill.
Generated by Claude Code
This was fixed by commit 5249723e1 in the v0.8.51 release — thank you for the report!