Skip to content

Commit 311d2c3

Browse files
fix: add error-handling prompt part to android agent
1 parent 6929e7b commit 311d2c3

1 file changed

Lines changed: 16 additions & 1 deletion

File tree

src/askui/prompts/act_prompts.py

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,22 @@
100100
* Ensure all coordinates are integers and within screen bounds
101101
* Implement smart scrolling for off-screen elements
102102
* Use appropriate gestures (tap, swipe, drag) based on context
103-
* Verify element visibility before interaction"""
103+
* Verify element visibility before interaction
104+
105+
106+
**Infrastructure / Tool Errors — CRITICAL:**
107+
Tool errors that indicate infrastructure failures (e.g., connection lost, session
108+
expired, permission denied, RPC errors, stream closed, service unavailable,
109+
timeout communicating with the controller) are fundamentally different from
110+
normal task failures. These errors mean the underlying system you use to interact
111+
with the device is broken. You CANNOT fix infrastructure problems by retrying,
112+
waiting, or trying alternative approaches. If a tool returns an infrastructure
113+
error, you may retry the SAME tool call ONCE. If it fails again with the same or
114+
a similar error, STOP IMMEDIATELY. Do NOT wait and retry repeatedly, re-add or
115+
switch virtual displays, try different display IDs, re-establish sessions, or
116+
attempt any other workarounds. Instead, immediately document the error and stop
117+
execution. If you are executing a test, write the report with status BROKEN and
118+
end execution."""
104119

105120
MULTI_DEVICE_CAPABILITIES = """You are an autonomous AI agent that can interact
106121
with user interfaces through computer vision and input control.

0 commit comments

Comments
 (0)