Repository navigation
Description
Summary
Every type=directory watcher subscription on native Android/Termux logs level=ERROR message="watcher backend not supported" directory=<path> platform=android role=server: there is no directory-watcher backend for platform=android, while type=file / type=entries subscriptions on the same platform start normally with backend=node. Each serve start produces one ERROR per directory watch (config dir, ~/.opencode, agents/skills stores), so daily restarts generate steady error noise — and, functionally, no live reload for those directories.
Environment
- opencode version: 2.0.22
- OS: Linux 6.6.127-android15-8 (android arm64, native Termux/Bionic — not proot)
- Terminal: xterm-256color, COLORTERM=truecolor
- Shell: Termux bash
- Install/channel: release ("latest"; single-binary bun bundle installed at
<prefix>/opt/fink-opencode/current/bin/opencode) - Active plugins: none configured
Reproduction
- Run
opencode serve --servicenatively on Android/Termux (arm64, Bionic). - Within the first second of serve start, read the server log.
- Count
message="watcher backend not supported"lines vsmessage="watcher started"lines bytype=. - Restart serve and repeat — counts reproduce each time.
Expected Behavior
Directory-type subscriptions either start on android or degrade the same way file/entries subscriptions do (to backend=node). At minimum, a WARN instead of ERROR.
Actual Behavior
One ERROR per directory watch per serve start. Two verified serve starts in one day burst 31 then 21 errors; the count tracks the directory set being watched (10 fewer after a skills-store reorg between the runs). Example line shape (paths not sensitive):
timestamp=… level=ERROR run=… message="watcher backend not supported" directory=…/.config/opencode platform=android role=server
Adjacent, in the same second, healthy lines like:
timestamp=… level=INFO message="watcher started" path=…/.config type=entries ignores=3 backend=node
Verified over the full log window: 52 ERROR lines vs 0 message="watcher started" … type=directory successes (success counter anchored on message= to exclude self-referential diagnostic echoes).
Additional Context
- Not symlinks: real (non-symlink) directories error identically (
~/.config/opencode,~/.opencode, real skills-store dirs). Only the skill entries inside one store are symlinks; the failing subscribes are the parent directories. - Fallback logic exists:
fileandentriessubscriptions successfully start withbackend=nodeon this platform — bundled-code inspection shows backend selection tracked by descriptortype, so it is the directory type that lacks an android fallback, not missing kernel support. watcher.ignorecannot filter these: the failing subscriptions carryignores=3(hardcoded["node_modules",".git","**/{node_modules,.git}/**"]for config dirs) orignores=0(skills stores); the config list feeds only the project-watcher transform, never these subscribes.- Functional impact: skills/config hot-reload is silently dead on android until the next serve restart; startup loading itself is unaffected (our store verifier resolves 18/18 skills across the same stores).
- Local workaround: none possible via config — we run a fail-neutral census (
watcher census (android): noise=N dir-watches-started=0) and restart serve after skill changes. - Request: an android fallback for directory-type watches (reuse the node backend already used by entries/file), or demote the message to WARN.
- Secondary same-platform flag (not this bug): 5×
Failed to fetch models.devTimeoutErrorin the same window whilecurl https://models.devfrom the same device returns HTTP 302 in 0.15s — suggests the android HTTP path may deserve its own look; filed separately to keep this report focused. - Unrelated errors present in the same window (excluded from this report): free-tier quota
Failed to drain Sessionlines.
Activity
opencode-agent commentedon Oct 23, 2026
Thanks for the detailed report and the log counts.
What you're asking for, as I understand it: on Android/Termux,
type=directorywatches should either work (for example by falling back to Node's watcher, likefile/entriesalready do) or at least log at WARN instead of ERROR. That would bring back live reload for config and skills directories.Android isn't currently a supported platform, so I'm treating this as a feature request rather than a bug. In the current code,
fileandentrieswatches always use Node'sfs.watch, which is why they showbackend=nodeon every platform.directorywatches use the native recursive watcher (@parcel/watcher), which only has backends for Windows, macOS and Linux. On Android,process.platformisandroid, so no backend is selected and the watch is skipped with that ERROR line. That matches what you saw.This can't be worked around with a plugin, since the plugin API has no way to supply a watcher backend. The maintainers will consider the request. Related issues:
watcher backend not supportedsymptom when the native watcher can't load on NixOS