Treat computer-use approval denial as rearm required
Map COMPUTER_USE_APPROVAL_REQUIRED tool responses into the existing COMPUTER_USE_REARM_REQUIRED stop guidance. This keeps agents from retrying desktop actions or using screenshot fallbacks when macOS permissions still require a user-approved re-arm.
Alessandro Frau committed
May 23, 2026 at 13:32 UTC
a80cf3842e770e151fd2cce3828cfc6139c6eb82
1 file changed
+4
-1
plugins/_a0_connector/tools/computer_use_remote.py
+4
-1
@@ -357,7 +357,10 @@ class ComputerUseRemote(Tool):
357
def _format_error(self, result: dict[str, Any]) -> str:
358
error = str(result.get("error") or "Unknown error")
359
code = str(result.get("code") or "")
360
- if code == "COMPUTER_USE_REARM_REQUIRED" or error == "COMPUTER_USE_REARM_REQUIRED":
360
+ if code in {"COMPUTER_USE_REARM_REQUIRED", "COMPUTER_USE_APPROVAL_REQUIRED"} or error in {
361
+ "COMPUTER_USE_REARM_REQUIRED",
362
+ "COMPUTER_USE_APPROVAL_REQUIRED",
363
+ }:
364
detail = error if error and error != code else REARM_REQUIRED_DEFAULT_MESSAGE
365
return (
366
"COMPUTER_USE_REARM_REQUIRED: "