← Back to PRs

#8311: feat(gateway): add SYSTEM_COMMANDS to Android node allowlist

by ipv1337 open 2026-02-03 21:39 View on GitHub →
gateway stale size: XS
## Summary Android nodes can now receive `system.*` commands (`system.notify`, `system.run`, `system.which`, etc.) just like macOS/Linux/Windows nodes. ## Motivation When building photo description features in the Android app, I discovered that agents cannot send notifications to Android nodes because `system.notify` was not in the Android platform`s default command allowlist. The gateway filters incoming commands based on `PLATFORM_DEFAULTS` in `node-command-policy.ts`. Android only had: - `CANVAS_COMMANDS` - `CAMERA_COMMANDS` - `SCREEN_COMMANDS` - `LOCATION_COMMANDS` - `SMS_COMMANDS` While macOS/Linux/Windows included `SYSTEM_COMMANDS`. This seems like an oversight since Android devices are equally capable of receiving notifications and running commands. ## Changes - Added `...SYSTEM_COMMANDS` to the Android platform defaults in `node-command-policy.ts` ## Testing - Tested on Pixel 10 Pro Fold running OpenClaw Android 2026.2.1-dev - Verified `nodes.notify` action now succeeds for Android nodes - Verified `system.notify` appears in the node`s advertised commands after reconnect ## AI Disclosure 🤖 AI-assisted: Built with Claude. Fully tested on physical device. <!-- greptile_comment --> <h2>Greptile Overview</h2> <h3>Greptile Summary</h3> This PR expands the Android node command allowlist by adding `SYSTEM_COMMANDS` to the Android `PLATFORM_DEFAULTS` in `src/gateway/node-command-policy.ts`, bringing Android parity with macOS/Linux/Windows for `system.*` commands (e.g., `system.notify`, `system.run`, `system.which`). The change affects how the gateway’s `resolveNodeCommandAllowlist` builds the permitted command set for Android nodes, which is then enforced by `isNodeCommandAllowed`. <h3>Confidence Score: 4/5</h3> - This PR is likely safe to merge and is a straightforward allowlist expansion. - The change is a single-line addition to Android defaults and reuses an existing command set already enabled on other platforms. Main risk is policy/permission mismatch on Android (some `SYSTEM_COMMANDS` entries may not be implemented or desired there), but the gateway will still require the node to declare the command, limiting unexpected execution paths. - src/gateway/node-command-policy.ts (confirm Android should expose all entries in SYSTEM_COMMANDS, particularly exec approval and browser proxy commands). <!-- greptile_other_comments_section --> <sub>(2/5) Greptile learns from your feedback when you react with thumbs up/down!</sub> **Context used:** - Context from `dashboard` - CLAUDE.md ([source](https://app.greptile.com/review/custom-context?memory=fd949e91-5c3a-4ab5-90a1-cbe184fd6ce8)) - Context from `dashboard` - AGENTS.md ([source](https://app.greptile.com/review/custom-context?memory=0d0c8278-ef8e-4d6c-ab21-f5527e322f13)) <!-- /greptile_comment -->

Most Similar PRs