#8311: feat(gateway): add SYSTEM_COMMANDS to Android node allowlist
gateway
stale
size: XS
Cluster:
Cross-Platform Fixes
## 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
#15953: fix: Android/Termux node fails to discover commands
by MisterGuy420 · 2026-02-14
75.8%
#23326: fix(daemon): graceful degradation on unsupported platforms
by indistinctchatter604 · 2026-02-22
74.7%
#20077: fix(android): expose node invoke commands consistently + add sms.read
by schergr · 2026-02-18
73.6%
#6064: fix(daemon): prefer bundled node from install-cli.sh over system node
by joyshmitz · 2026-02-01
71.2%
#13321: android/gateway: harden manual connect identity and A2UI UX
by m888m · 2026-02-10
69.4%
#7060: fix: handle uv_interface_addresses failure on Android/Termux
by kjoh94 · 2026-02-02
69.3%
#11205: Android: fix gateway connection and canvas URL for Tailscale serve
by emonty · 2026-02-07
68.8%
#5867: Android: Add BouncyCastle Ed25519 fallback and gateway token UI
by brandonpollack23 · 2026-02-01
68.8%
#22484: Android: add flashlight on/off control support
by ztechenbo · 2026-02-21
68.8%
#13537: Gateway: add commands.list slash command metadata API
by Pyiner · 2026-02-10
68.3%