Local-first AI coding agent desktop: Electron + Rust host core + pi Agent Harness + user-installable plugins
TypeScript ai-agentcoding-agentdesktop-appelectronglobali18nlocal-firstmcppipi-agentpi-desktoppluginsreactrusttypescript
ADR 0326: Verified SSH Host installation and daily startup
- Status: Accepted for experimental implementation; Linux SSH qualification and release publication pending
- Date: 2026-10-11
- Related: ADR 0292, ADR 0293, Local Agent remote workspace tools
- Amends: ADR 0292, specifically the executable-upload prohibition and the remote GitHub-access prerequisite, plus the corresponding D375 deployment choice
Context
The original bootstrap required system Node 22 or newer and outbound GitHub access on the remote machine, and reusing installation and pairing for daily connection risks unnecessary downloads, process restarts, and credential churn. Users already hold SSH shell authority, so a blanket ban on executable upload blocked a useful fallback without protecting against a compromised release source.
Decision
- Keep system OpenSSH with its host-key checks, configured identities and jump hosts, and RACP-WS over loopback forwarding. No SSH stdio RPC, public listener, elevated privileges, or mandatory systemd service.
- Resolve the matching Desktop version and published Linux x64 or arm64 target,
and take the named archive SHA-256 from the trusted GitHub Release. A remote
download is preferred; only an explicit
download-failedpermits one bounded Desktop download and SSH stdin upload of the same archive, while integrity, authentication, and version failures never authorize that fallback. - Verify the archive before extraction on the remote machine, and verify the fallback locally before uploading it under a bounded size and time limit, using private temporary directories with cleanup on success and failure.
- Bundle native-target Node 22 or newer, the Agent runtime, host-core, launcher,
installer, and
SHA256SUMS. Staged files are verified, unsafe manifest paths rejected, version directories installed content-addressed, and thecurrentsymlink replaced atomically under kernel-owned locks. A failed stage never overwrites the previous install, and a legacy realcurrentdirectory is refused rather than converted. - Bootstrap reuse requires an external
.release.sha256receipt matching the version, trusted archive digest, and installed manifest digest, plus a successful read-onlyinstall.sh --verify. Bundles without a manifest do not qualify. - Install and pairing are separate from daily readiness: the supervisor starts the
installed Host only when needed, prefers bundled Node, uses
--port 0without--pair, preserves Host identity and device credentials, validates loopback readiness, version, and the saved Host id before forwarding, and revalidates the RACP identity on reconnect. An ordinary disconnect does not kill a Host another client may use. - New remote workspace projects keep Agent execution, models, credentials, permissions, and sessions on Desktop; remote tools, files, and root repository instructions use owner-only workspace services.
- Recovery never replays
Write,Edit, orBash. A lost transport reply yields the non-retriableREMOTE_MUTATION_OUTCOME_UNKNOWNand requires inspection before an explicit retry.
Consequences
- SHA-256 authenticates bytes against the trusted release descriptor but is not a signature, so host authentication and workspace containment stay mandatory.
- No migration appears, existing connections keep ownership, and legacy Host installations may need an explicit reinstall to gain the bundled runtime.
- Desktop may now send verified release bytes through the user's SSH session: a limited amendment to ADR 0292, not permission to upload arbitrary model-generated executables.
- The change stays Experimental; Linux kernel-lock crash recovery, fresh installation, and reboot recovery are gated by E2E-REMOTE-SSH-OPTIMIZATION.