当代码是免费的,为什么Claude是Electron应用?
Why is Claude an Electron app?

原始链接: https://www.dbreunig.com/2026/02/21/why-is-claude-an-electron-app.html

尽管人工智能编码代理在跨平台原生代码生成方面取得了进展,但许多应用程序——即使是来自Anthropic的Claude等人工智能领导者的应用程序——仍然依赖Electron。Electron允许开发者使用Web技术(HTML、CSS、JavaScript)构建适用于多种操作系统的桌面应用程序,虽然这会带来便利,但会导致应用程序体积更大、速度更慢。 核心问题不在于*创建*代码,而在于完善和*维护*代码。编码代理擅长开发过程的最初90%,但在边缘情况、错误修复以及实际使用所需的持续支持方面却面临困难。为每个平台(Mac、Windows、Linux)开发原生应用程序会将支持负担和平台特定问题的可能性增加三倍,而Electron的共享代码库可以减轻这种风险。 虽然明确的规范和测试套件*可能*能够实现代理驱动的原生开发,但“最后一步”的复杂性和增加的维护成本目前超过了收益,使得Electron成为许多开发者的务实选择。

## Claude 与 AI 编程工具现状 - Hacker News 总结 Hacker News 上的一场讨论集中在 Claude 的一个令人困惑的决定:尽管 Claude 声称能够轻松生成代码,但它被构建为一个 Electron 应用。用户质疑,一个吹嘘代码生成能力的工具为什么没有原生支持所有平台,特别是 Windows 和 Linux。 许多评论者对 Claude 和 Copilot 等工具的性能和错误表示沮丧。一些人强调了 Claude 的桌面应用和 IntelliJ 插件存在的问题,指出它们通常感觉开发不足。一个反复出现的主题是,尽管 AI 驱动的编程备受炒作,但目前的现实离无缝体验还很远,仍然需要大量的调试和质量保证。 对话涉及 AI 开发的成本(token、基础设施)以及“免费代码”是一个神话的观点。一些人建议使用 Tauri 进行更高效的跨平台开发,而另一些人则指出了更广泛的问题,即软件质量下降以及客户对错误的容忍度降低。最终,用户对 AI 公司做出的承诺持怀疑态度,并要求提供更强大、更可靠的工具。
相关文章

原文

If code is free, why aren’t all apps native?

The state of coding agents can be summed up by this fact

Claude spent $20k on an agent swarm implementing (kinda) a C-compiler in Rust, but desktop Claude is an Electron app.

If you’re unfamiliar, Electron is a coding framework for building desktop applications using web tech, specifically HTML, CSS, and JS. What’s great about Electron is it allows you to build one desktop app that supports Windows, Mac, and Linux. Plus it lets developers use existing web app code to get started. It’s great for teams big and small. Many apps you probably use every day are built with Electron: Slack, Discord, VS Code, Teams, Notion, and more.

There are downsides though. Electron apps are bloated; each runs its own Chromium engine. The minimum app size is usually a couple hundred megabytes. They are often laggy or unresponsive. They don’t integrate well with OS features.

(These last two issues can be addressed by smart development and OS-specific code, but they rarely are. The benefits of Electron (one codebase, many platforms, it’s just web!) don’t incentivize optimizations outside of HTML/JS/CSS land.)

But these downsides are dramatically outweighed by the ability to build and maintain one app, shipping it everywhere.

But now we have coding agents! And one thing coding agents are proving to be pretty good at is cross-platform, cross-language implementations given a well-defined spec and test suite.

On the surface, this ability should render Electron’s benefits obsolete! Rather than write one web app and ship it to each platform, we should write one spec and test suite and use coding agents to ship native code to each platform. If this ability is real and adopted, users get snappy, performant, native apps from small, focused teams serving a broad market.

But we’re still leaning on Electron. Even Anthropic, one of the leaders in AI coding tools, who keeps publishing flashy agentic coding achievements, still uses Electron in the Claude desktop app. And it’s slow, buggy, and bloated app.

So why are we still using Electron and not embracing the agent-powered, spec driven development future?

For one thing, coding agents are really good at the first 90% of dev. But that last bit – nailing down all the edge cases and continuing support once it meets the real world – remains hard, tedious, and requires plenty of agent hand-holding.

Anthropic’s Rust-base C compiler slammed into this wall, after screaming through the bulk of the tests:

The resulting compiler has nearly reached the limits of Opus’s abilities. I tried (hard!) to fix several of the above limitations but wasn’t fully successful. New features and bugfixes frequently broke existing functionality.

The resulting compiler is impressive, given the time it took to deliver it and the number of people who worked on it, but it is largely unusable. That last mile is hard.

And this gets even worse once a program meets the real world. Messy, unexpected scenarios stack up and development never really ends. Agents make it easier, sure, but hard product decisions become challenged and require human decisions.

Further, with 3 different apps produced (Mac, Windows, and Linux) the surface area for bugs and support increases 3-fold. Sure, there are local quirks with Electron apps, but most of it is mitigated by the common wrapper. Not so with native!

A good test suite and spec could enable the Claude team to ship a Claude desktop app native to each platform. But the resulting overhead of that last 10% of dev and the increased support and maintenance burden will remain.

For now, Electron still makes sense. Coding agents are amazing. But the last mile of dev and the support surface area remains a real concern.


联系我们 contact @ memedata.com