OpenCode Desktop Drops Tauri for Electron: A Pragmatic Choice for a TypeScript-First AI Coding Agent

OpenCode Desktop Drops Tauri for Electron: A Pragmatic Choice for a TypeScript-First AI Coding Agent

lschvn

TypeScript All the Way Down

OpenCode is an open source AI coding agent built entirely in TypeScript. Its architecture follows a client-server model where the TUI, web UI, and desktop clients all communicate with a central server that handles LLM interactions, agent loops, and an SQLite database. This means a running server process is always required β€” which is what the Desktop app has always been wrapper around.

The initial Desktop build used Tauri, chosen for its lightweight profile as a thin webview container. On startup, it would launch the bundled CLI via opencode serve, giving the web UI a local server to connect to. It worked, but over time two problems compounded.

The WebKit Problem

Tauri uses the system WebView on macOS and Linux β€” WebKit on those platforms, and WebView2 on Windows. The OpenCode team found that WebKit not only renders their UI with worse performance than Chromium, but also produces minor visual inconsistencies between platforms. For an application used daily by developers who switch between operating systems, consistency matters.

"Tauri has an ongoing effort to support Chromium via CEF instead of the system webview, but when that will be stable remains uncertain."

There is an active Chromium Embedded Framework (CEF) effort inside Tauri, but no firm timeline for stabilization. OpenCode couldn't wait.

The Bundled CLI Tax

The second issue was the bundled CLI itself. The OpenCode server code originally relied on Bun-specific APIs, which meant bundling the Bun CLI inside Tauri. This had two consequences: slower startup times, and occasional failures on Windows that the team spent significant effort working around.

When OpenCode decided to move away from Bun-specific APIs anyway (in favor of Node compatibility), the appeal of bundling an entire CLI disappeared. Electron's built-in Node process could simply run the server directly β€” no subprocess, no extra binary, no startup tax.

What Changes and What Doesn't

OpenCode Desktop will soon ship the Electron build as the default for direct downloads and beta-channel updates, eventually moving general releases over as well. The underlying server still runs TypeScript β€” it just now executes inside Electron's Node process rather than a bundled external binary.

The team is straightforward about the tradeoff: plugins that depend on Bun-specific APIs will not work in the Electron builds. A full explanation is promised with OpenCode 2.0.

Not a Judgment on Rust or Tauri

The OpenCode team took care to frame this as a use-case-driven decision, not a value judgment on Tauri or Rust. Tauri excels when an application's core logic lives in Rust and the webview is genuinely lightweight β€” as was the case with a previous video encoding project the author worked on. OpenCode's logic, however, is all TypeScript, meaning Rust's advantages never applied to the compute-heavy part of the stack.

"If you're building an app with a simpler UI that demands native performance or easy access to system APIs, I think Tauri is still a great fit."

The Electron beta is available now via the opencode-beta GitHub repo.

Frequently Asked Questions

Related articles

More coverage with overlapping topics and tags.

Bun Joins Anthropic: What the Acquisition Means for the JavaScript Ecosystem
TypeScript

Bun Joins Anthropic: What the Acquisition Means for the JavaScript Ecosystem

The JavaScript runtime, bundler, and toolkit built by a 14-person team and relied on by millions of developers has been acquired by Anthropic. Bun will remain open source and MIT-licensed, but the roadmap now bends toward AI coding infrastructure.
WebStorm 2026.1 Ships Service-Powered TypeScript Engine and a Full AI Agent Roster
TypeScript

WebStorm 2026.1 Ships Service-Powered TypeScript Engine and a Full AI Agent Roster

JetBrains' March release turns on a service-based TypeScript engine by default, puts Junie, Claude Agent, Codex, and Cursor in the AI chat sidebar, sunsets Code With Me, and adds native Wayland support on Linux.
Astro 6.1.8 Patches Critical Netlify Deploy Bug and Image Endpoint Security Flaw
TypeScript

Astro 6.1.8 Patches Critical Netlify Deploy Bug and Image Endpoint Security Flaw

Astro 6.1.8 fixes a regression where build output filenames containing special characters caused deploy failures on Netlify and Vercel, and patches a content-type confusion vulnerability in the built-in image endpoint that could serve non-SVG content as SVG.

Comments

Log in Log in to join the conversation.

No comments yet. Be the first to share your thoughts.