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.

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

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.
Claude Code Went from Zero to #1 in Eight Months: The 2026 AI Coding Tool Showdown
ai

Claude Code Went from Zero to #1 in Eight Months: The 2026 AI Coding Tool Showdown

By early 2026, Claude Code held a 46% 'most loved' rating among developers, leaving Cursor at 19% and GitHub Copilot at 9%. But love ratings and usage rankings don't tell the whole story. Here's what each tool actually does well, and when to use which.
Claude Code Issue #74066: Users Report Cross-Workspace Context Bleed on Sonnet 5, Anthropic Has Not Yet Responded
ai

Claude Code Issue #74066: Users Report Cross-Workspace Context Bleed on Sonnet 5, Anthropic Has Not Yet Responded

An open bug filed against Claude Code on 2026-07-04 by an [Enterprise ZDR](https://docs.anthropic.com/en/docs/build-with-claude/zero-data-retention) user describes a working session on Sonnet 5 that suddenly starts referencing an unrelated Minecraft temple build, then doubles down on the wrong task in its recap. The reporter (GitHub: [@milesrichardson-edb](https://github.com/milesrichardson-edb), issue [anthropics/claude-code#74066](https://github.com/anthropics/claude-code/issues/74066)) is on Enterprise Zero Data Retention, the tier Anthropic specifically advertises as session-isolated. Triage on the reporter's local session JSONL at `~/.claude/projects/<encoded-cwd>/<session-id>.jsonl` finds the leaked text is not in the transcript, ruling out a local context bleed by file overlap. Four other users in the comments (with work histories going back to last year) describe near-identical behavior across Claude Code, Claude Mobile, and Claude deep research. The most plausible architectural fit is shared KV-cache state in inference ([per @yv3nne in the comments](https://github.com/anthropics/claude-code/issues/74066#issuecomment-4880448776)), but no Anthropic engineer has commented on the issue in the 22 hours since it was filed, and the issue reached the top of [Hacker News](https://news.ycombinator.com/item?id=42481789) on 2026-07-04. The tone in the thread is split: half suspecting a real platform cache reuse, half suspecting a [sonnet-5-specific hallucination triggered by a Pygments lexer](https://github.com/anthropics/claude-code/issues/74066#issuecomment-4880334711). Both readings are credible.

Comments

Log in Log in to join the conversation.

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