GUIAgent: 已暂停的运行循环无法通过 stop()、文档中描述的 abort 信号或 (在第二次暂停后) 通过 resume() 释放。

作者: sxh313创建于 2026年9月23日更新于 2026年9月23日

Description

GUIAgent's pause/resume API has exactly one release hook: resume() is the only thing that ever resolves resumePromise, and the run loop checks the two cancellation flags (isStopped, signal.aborted) only after it has awaited that promise. So once the loop is parked, stop() and the abort signal that the SDK README documents as the way to cancel do nothing at all — run() never settles. A redundant pause() makes it worse: it replaces resumePromise, orphaning the promise the loop is actually waiting on, after which even resume() cannot release the loop.

内容来源: bytedance/UI-TARS-desktop