# Remoraid **Reliable device control starts with knowing what happened.** Android, desktop hosts and a relay cooperate on device actions. Sessions, receipts and recovery rules prevent a lost response from becoming a silently repeated action. Status: Personal prototype. Evidence reviewed 2026-10-11. [Read the illustrated case study](https://code.knickqueue.win/assets/portfolio/case-studies/remoraid.html) ## My contribution Built the Android client, relay protocol, cross-platform host integration and recovery fixtures. The project integrates existing operating-system automation APIs and the upstream Hermes agent framework. Its custom contribution is the device bridge, session ownership, result journal, interface and lifecycle behavior. ## The problem A command can succeed even when its response is lost. Retrying a read is often harmless; repeating a click, typed message or file mutation may not be. Reconnection therefore needs a record of identity and outcome, not just another request. Remoraid connects an Android client with native computer hosts and a relay. Commands are authenticated and bound to an active target session. The local USB path uses authorized ADB reverse; remote relay paths have separate credentials and leases. Capabilities are explicit so a limited target does not inherit general desktop or shell access. ## Engineering decisions ### Bind actions to a current session Heartbeats maintain short leases. Session changes, disconnection or expiry invalidate stale queued commands. Desktop input checks the expected foreground window; Android coordinate input can reject a changed screen instead of sending a stale gesture. ### Separate execution from delivery Android persists encrypted response receipts separately from executing the action. Recovery can retransmit a known result without invoking the action again. An interrupted mutation whose outcome cannot be proved remains uncertain rather than being automatically retried. ### Bound background work Network reads, screenshot work and status refreshes have explicit limits. Slow read-only providers have a bounded worker allowance. The interface can show cached state and a disconnection while one refresh is blocked, then resume polling automatically. ## A failure that shaped the design The important failure fixture accepts a prompt and then loses its response. After a relay restart, recovery keeps the original submission identity and looks up that original run. Mismatched receipts and unavailable ownership checks hold the operation instead of creating a second submission. ## Evidence and scope - **Phone transport:** A recorded 20-request live phone.info sample measured 100.24 ms p95 round-trip time, compared with 237.98 ms for an earlier polling candidate. Scope: October 7, build 99; sequential transport requests, excluding model inference. Not a general task-completion benchmark. - **Physical Android controls:** The installed Fold7 candidate passed a temporary app's click, Unicode text, submit, long press, scroll, capture, tap, swipe and held-drag checks. Scope: A controlled live fixture, not arbitrary-app compatibility. - **Recovery:** Recorded fixtures cover lost responses, relay restart, original submission identity, process restart, failed acknowledgments and corrupted receipt state. Scope: Implementation and recorded acceptance reviewed; not rerun during portfolio preparation. These are reviewed recorded results, unless explicitly described as current public-access verification. Application tests and physical-device checks were not rerun for this portfolio. ## Remaining limits - An unavailable result cannot prove whether a mutation happened. The system preserves that uncertainty. - Provider/model time, target-app responsiveness and OS permissions still affect completion. Physical Mac/Linux reconnection and desktop authorization were not repeated in the cited acceptance. ## Evidence references - protocol.md — leases, session-bound actions and signed-update rollback - PERFORMANCE.md — October 7 build-99 measurements and limitations - android/.../ResultJournal.java — persistent response receipts - tools/test_performance_recovery.py — lost-response and restart fixtures - tools/test_phone_delivery.py — receipt and acknowledgment persistence Revision: `cb3858b20d5ff2aab898e11a24b58f5de01d4c13` Private development prototype. This write-up describes the cited acceptance snapshot; later local changes are not presented as part of those measured results.