Keep Cua Driver running
Register Cua Driver as a persistent daemon that starts automatically and survives reboots.
Cua Driver requires a daemon for tool execution. The daemon owns the per-pid element cache, permission policy, recording and configuration state, macOS TCC attribution, and the Windows interactive-session context. MCP and one-shot CLI calls fail if they cannot reach it.
cua-driver autostart is not implemented for macOS yet, so write a LaunchAgent instead.
If you have a checkout of the cua repo, the helper script writes it for you (run from the repo root):
bash libs/cua-driver/scripts/install-local.sh --autostartIf you installed via the one-line installer and have no checkout, create the plist yourself. Save this file at ~/Library/LaunchAgents/com.trycua.cua-driver.plist:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.trycua.cua-driver</string>
<key>ProgramArguments</key>
<array>
<string>/Applications/CuaDriver.app/Contents/MacOS/cua-driver</string>
<string>serve</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<true/>
</dict>
</plist>Load the LaunchAgent:
launchctl load ~/Library/LaunchAgents/com.trycua.cua-driver.plistA LaunchAgent daemon starts under launchd and is attributed to com.trycua.driver. Grant Accessibility and Screen Recording once, and those grants persist across reboots. If you start prompts from a terminal without a LaunchAgent, macOS attributes them to the terminal instead of the driver, so the grants do not apply to Cua Driver.
Verify it's running#
cua-driver status
# Cua Driver daemon is running
# socket: /Users/you/Library/Caches/cua-driver/cua-driver.sock
# pid: 12345On Windows the socket path is \\.\pipe\cua-driver and status also reports the session number.
Stop it cleanly#
cua-driver stopThis sends a shutdown signal to the daemon process. The autostart entry, whether LaunchAgent, Scheduled Task, or systemd unit, remains registered and starts it again on the next logon or trigger.