name: cu-desktop description: "Computer Use desktop operation guide. Auto-injected when CU mode is enabled." requiresBeta: cuMode descriptions:
Follow these rules when using Computer Use (CU) tools to control the desktop.
All desktop_* tools are registered as native model tools — call them
directly by name. This includes screenshot tools (desktop_screenshot,
desktop_screenshot_region, desktop_zoom).
NEVER use bash/shell or any CLI wrapper to call CU tools.
Always call desktop_screenshot, desktop_left_click, etc. directly as
native tools. The bash path bypasses screenshot compression and token
limits, causing context overflow.
Every GUI action follows a closed-loop cycle:
desktop_screenshot to observe the current screen"I have evaluated step X — [result]"Before any GUI task, check whether the target app is already open:
desktop_window_list to see all windowsdesktop_window_focus to bring it forwarddesktop_window_restore (on Windows, you must specify window_id or window_title)| Action | Method |
|---|---|
| Launch app | desktop_key combo="win+s" → desktop_type text="app name" → wait for results → desktop_key combo="Return" |
| Switch window | desktop_key combo="alt+Tab" |
| Show desktop | desktop_key combo="win+d" |
| File Explorer | desktop_key combo="win+e" |
| Run dialog | desktop_key combo="win+r" |
| Task Manager | desktop_key combo="ctrl+shift+Escape" |
| Lock screen | Forbidden |
| Action | Method |
|---|---|
| Launch app | desktop_key combo="cmd+space" → desktop_type text="app name" → desktop_key combo="Return" |
| Switch window | desktop_key combo="cmd+Tab" |
| Show desktop | desktop_key combo="f11" or desktop_key combo="cmd+f3" |
| Finder | desktop_key combo="cmd+space" → desktop_type text="Finder" → desktop_key combo="Return" |
| Force Quit | desktop_key combo="cmd+alt+Escape" |
After launching an app, use desktop_wait duration_ms=1500 for the window to
render, then screenshot to confirm. Large apps (IDE, browser) may need
3000–5000 ms.
Prefer keyboard over mouse clicks to avoid coordinate uncertainty:
alt+f for File menu)Consecutive click + type sequences do not need intermediate screenshots. Execute them together and screenshot once at the end:
desktop_left_click coordinate=[500, 300]
desktop_type text="search query"
desktop_key combo="Return"
Taskbar icons, status bar text, and small buttons are hard to read in full-screen screenshots:
desktop_zoom with the target region to identify what the element looks likeCritical:
desktop_zoomanddesktop_screenshot_regionare for visual identification only — confirming which icon is which, reading small text, etc. Never calculate click coordinates from zoomed/region images. The pixel-to-normalized math is error-prone and wastes thinking tokens. Always estimate click coordinates from the original full-screen screenshot.
When unsure about a target's position:
desktop_zoom to visually confirm the element, then estimate coordinates from the full-screen screenshot[0, 0] = top-left corner[500, 500] = screen center[1000, 1000] = bottom-right corner0.5)Click / move / scroll tools accept coordinates in two formats:
| Format | Example | Notes |
|---|---|---|
x + y fields (preferred) |
{ "x": 500, "y": 300 } |
Always works; use this by default |
coordinate tuple |
{ "coordinate": [500, 300] } |
Also valid, but tuple values must be plain numbers — never strings or objects |
Always use x/y fields. The coordinate tuple is prone to serialization
issues that cause silent failures.
| Area | Approximate coordinate range |
|---|---|
| Windows taskbar | y: 960–1000 |
| macOS menu bar | y: 0–25 |
| macOS Dock | y: 950–1000 (bottom) |
| Screen center | [500, 500] |
| Top-left corner | [0–100, 0–100] |
After clicking an input field, do not rely on visual cues (placeholder disappearing, cursor blinking, border highlight) to confirm focus — these vary across apps and may not be visible in screenshots.
The reliable test: type a short test string (e.g. desktop_type text="t")
→ screenshot → check if the character appeared in the field.
Backspace)
and proceed with the real input.This avoids wasting many turns clicking the same area and staring at unchanged screenshots. Do this on the first uncertain click, not after 5 failed attempts.
Use desktop_type text="your text" directly.
Chinese, Japanese, Korean, and other non-ASCII characters may fail with
desktop_type. If direct input does not work:
desktop_clipboard_write text="中文内容" to write to clipboarddesktop_key combo="ctrl+v" (Windows) or desktop_key combo="cmd+v" (macOS) to pasteFor text longer than ~100 characters, prefer the clipboard approach to avoid
character loss with desktop_type.
| Problem | Recovery |
|---|---|
| Clicked wrong spot | desktop_key combo="Escape" → screenshot → re-locate |
| Unexpected dialog | Screenshot to read it → Escape or click Cancel |
| App not responding | Windows: desktop_key combo="alt+F4" / macOS: desktop_key combo="cmd+q" |
| Inaccurate coordinates | Zoom in with desktop_zoom and re-locate |
| Typed in wrong field | Ctrl+Z to undo → click correct field → retype |
| Page/app loading | desktop_wait duration_ms=2000 → screenshot to check |
| Same action failed 2× | Stop, screenshot, analyze, try a completely different approach |
For downloads, installs, or page loads, use segmented wait + screenshot:
desktop_wait duration_ms=3000
desktop_screenshot # check progress
# if not done, wait more
desktop_wait duration_ms=3000
desktop_screenshot # check again
Do not set a single long wait (e.g. 30 s) without checking intermediate state.
After completing a GUI workflow, record the reusable strategy in agent memory.
### Send Feishu message (win32) (2026-06-11)
Type: cu-workflow
1. desktop_window_list to check if Feishu is open
2. If not: Win+S → search "Feishu" → Enter
3. Wait 3s → screenshot to confirm main window
4. Ctrl+K to open search → type contact name → Enter
5. Type message in chat input → Enter to send
6. Screenshot to confirm message sent (bubble appears in chat area)
Key insight: Feishu search uses Ctrl+K, not clicking the search bar