T06 · System Persistence
- Location
scripts/install.sh:45- Finding
Persistent LaunchAgent Runs the Queue Daemon Across User Sessions
- Content
View full analysis
"$PLIST" < Label ai.openclaw.queue-daemon ProgramArguments /usr/bin/env node ${QUEUE_DIR}/daemon.js RunAtLoad KeepAlive StandardOutPath ${QUEUE_DIR}/daemon.log StandardErrorPath ${QUEUE_DIR}/daemon.log PLIST_EOF launchctl unload "$PLIST" 2>/dev/null || true launchctl load "$PLIST" ``` ### Technical Analysis The manual installer creates a user LaunchAgent in `~/Library/LaunchAgents` and immediately loads it. `RunAtLoad` causes the daemon to start when the LaunchAgent is loaded or the user logs in, while unconditional `KeepAlive` causes launchd to restart the process after it exits. Persistent execution is related to the declared delayed-task functionality and is explicitly disclosed in `SKILL.md` and `public.json`. However, unconditional restart behavior grants the component durable, cross-session execution beyond a single Skill invocation. The installed program is a JavaScript file under the user's writable home directory: ```text ~/.openclaw/queue/daemon.js ``` Consequently, any process operating as the same user that replaces this file can alter the program subsequently executed and maintained by launchd. The project also provides no automated uninstall procedure to unload and remove the service. The Launch ...[truncated 1312 chars]- Remediation
View remediation
