Five Practical Pitfalls in AI GUI Automation
A technical account from 掘金 · 人工智能 describes five problems encountered while running a local AI GUI-automation setup on Windows 11 with DeepSeek Harness 0.2.2-rc.5. It shows that tool-level errors must be separated from failed commands, then covers minimized-window visibility, PowerShell encoding, zero-sized elements, and unified failure-code handling. The author also proposes a fixed error-code order so agents diagnose failures before deciding whether to retry.
The article turns several locally observed GUI-agent failures into concrete verification rules, including checking window state and distinguishing command execution from business success.
让 AI 自己操作 GUI:5 个只有真跑起来才会遇到的坑
实测环境:Windows 11 + DeepSeek Harness 0.2.2-rc.5,纯本地、零第三方依赖。代码量不大(两个脚本加一个包壳,约 400 行),但每一个坑都是线上撞出来的,不是设计出来的。
很多人做 AI 操作界面,第一步是接 Playwright 或者写个截图 + 多模态判读的循环。我也这么想过,后来发现真正卡住人的不是"怎么点",而是"怎么知道点成功了"。
这篇文章不讲架构,只讲 5 个具体的坑,以及我现在用的判定顺序。
坑 1:isError 永远是 false
我一开始理所当然地认为,工具失败的标志就是 isError。