解决Trae运行任务报错:工作环境启动失败,请重试。 (992602.

📅 2026/7/16 13:11:58
解决Trae运行任务报错:工作环境启动失败,请重试。 (992602.
想让Trae帮我完成任务帮我看看系统晚上是睡眠了还是关机了 是计划内的吗结果报错Trae运行任务报错工作环境启动失败请重试。 (992602.Toolhost startup failed: VM start failed: Timeout waiting for toolhost to be ready; fallback also failed: Timeout waiting for toolhost to be ready)问题排查页问题排查提供992602.xxxxmacOS、Windows工作环境启动失败。参考 “通用解决方案” 部分重启 TRAE Work。通用解决部分检查 Windows 系统版本。若操作系统内部版本OS Build低于 19044先将系统升级至 Windows 10 21H2 或更高版本后再重新尝试。但是我这是Windows11 啊应该不算低啊参考MacOS的使用 command Q 快捷键完全退出 TRAE Work。打开 macOS 中的活动监视器然后在 CPU 页签中搜索 “SOLO” 关键字。结束 “TRAE SOLO CN 的“ 这一代表工作环境的进程 如果存在。检查电脑的磁盘空间和内存确保剩余 2G 磁盘空间和 1G 可用内存。重新打开 TRAE Work。重新关闭了Trae然后观察任务管理器发现Trae的进程全部关干净了这点要比MacOS下好。所以这个方法无法在Windows下适用。自己没搞定问Trae启动trae 的work任务报错1053797751201322:no_trace_6a582a778e5222afdb4ad233.temp-agent-6a582a778e5222afdb4ad233-1784164418642-alpqam.6a582a788e5222afdb4ad234:TRAE Work CN.0.1.36.no_sid.no_ppe.T(2026/7/16 09:13:38) 请帮我解决这个问题Trae回答根据日志分析我已经找到了问题的根因。以下是详细诊断和解决方案问题诊断根本原因Work 模式的 ToolhostVM 沙箱执行环境启动超时失败错误发生在 [ai-agent 日志](file:///c:/Users/PCbeta Tester/AppData/Roaming/TRAE SOLO CN/logs/20260716T091200/Modular/ai-agent_0_1784164325629_stdout.log) 中关键错误链09:12:41-[Toolhost:Host] eager start skipped or failed: Timeout waiting for toolhost to be ready09:12:41- 尝试 fallback 直接启动不带 VM 沙箱同样超时09:13:13 / 09:13:36 / 09:13:38- 三次重试全部失败最终错误Toolhost startup failed: VM start failed: Timeout waiting for toolhost to be ready; fallback also failed加重问题的因素从 VM trace 日志可以看到toolhost 启动后花费了大量时间读取C:\Users\PCbeta Tester\AppData\Local\Temp\trae-agent-toolhost\jobs\下数百个历史 job 文件导致启动过程严重延迟。解决方案请按以下步骤操作1. 清理 toolhost 临时文件最关键这些历史 job 文件拖慢了 toolhost 启动需要清理PowerShellRemove-Item -Path $env:LOCALAPPDATA\Temp\trae-agent-toolhost -Recurse -Force -ErrorAction SilentlyContinue2. 完全重启 Trae IDE关闭 Trae IDE 后确保所有相关进程已退出然后重新启动。3. 如果问题仍然存在还可以尝试清理 work-mode 项目缓存PowerShellRemove-Item -Path $env:APPDATA\TRAE SOLO CN\ModularData\ai-agent\work-mode-projects -Recurse -Force -ErrorAction SilentlyContinue注意这会清除 Work 模式的项目缓存下次启动 Work 任务时会重新初始化。要我现在帮你执行这些清理命令吗一阵操作猛如虎Trae提醒我重启。重启的时候Tare说会中断任务问题是现在看不到有任务啊psTrae思考中看到如下信息There are still 7493 job directories remaining. The robocopy approach did make progress but there are still many left. Let me try a faster approach - just delete the entire directory using a background task or just let the user know the status.Actually, the simplest approach is to just try to delete the parent directory with Remove-Item -Recurse -Force, but itll be slow. Or I can use a different approach.Let me try to just rename the directory and then create a new one. Actually, the easiest approach is to just let the cleanup continue in the background. The user just needs to restart the IDE.Actually, let me try a different approach: rename the directory first (which is fast), then delete it in the background.我不知道这个7493个job目录怎么来的但肯定不是应该有的以我凡人之躯短短1个月不该有这么多目录问题解决Trae的操作真牛它帮我清理了工作目录的jobs 7493个 然后重启之后一切正常了Trae说问题就是历史 job 文件太多把 toolhost 启动拖超时了清理掉就好了。以后如果遇到类似问题可以直接按这个思路处理。不过为什么有那么多jobs我已经上报了。