zerostack: the coding agent that runs on 8MB, not 8GB

4 min read Tiếng Việt
Featured image for zerostack: the coding agent that runs on 8MB, not 8GB

I ran claude --version one morning just to check something. My cursor sat there. Four seconds later the terminal printed a version string and nothing else.

Someone on HN named mohsen1 timed it properly and shared the receipt:

$ time claude --version
2.1.143 (Claude Code)

Executed in    4.39 secs      fish           external
   usr time   29.68 millis    0.26 millis   29.41 millis
   sys time   71.30 millis    1.30 millis   70.00 millis

That benchmark is now sitting inside the comment thread for zerostack, a Rust coding agent that appeared on HN yesterday with 335 upvotes.

The story in one sentence

zerostack is a full-featured coding agent written in 7,000 lines of pure Rust - multi-provider LLM support (OpenRouter, OpenAI, Anthropic, Gemini, Ollama), a four-tier permission system, session management, a structured prompts system, MCP for extended tooling, git worktree integration, and a loop system for long-horizon tasks - with an idle RAM footprint of roughly 8MB and a binary that weighs 8.9MB.

For comparison, opencode and similar JS-based agents run at around 300MB idle.

Why this hit the front page

The ingredients are classic HN bait: Rust, one developer, a project that grew into something real, and a README with a performance table that makes other tools look embarrassed.

Metriczerostackopencode / JS agents
RAM (idle)~8MB~300MB
RAM (working)~12MB~300MB+
CPU (idle)0.0%~2%
CPU (tools)~1.5%~20%
Binary size8.9MB-

The punch lands harder when you look at what you actually get. This is not a stripped-down toy. It has a prompts system with switchable modes - code, plan, review, debug, ask, brainstorm, frontend-design, review-security, and more. It reads AGENTS.md and CLAUDE.md from your project root automatically, the same as every other major agent. It has a doom-loop detector that stops the agent when it repeats identical tool calls three times in a row.

In other words: all the features, one-fortieth the memory.

What the comments are arguing about

The top comment came from throwa356262, who got straight to the number that made everyone sit up:

“RAM footprint: ~8MB on an empty session, ~12MB when working. I like this, Claude Code is using multiple gigabytes, which is really annoying on low-end laptops.”

Right behind it, 360MustangScope admitted they were literally in the middle of writing their own Rust agent when zerostack appeared:

“It’s amazing having opencode slowly leak memory and end up becoming 6gbs on a large project and then get slower and slower.”

Then the sharpest comment in the whole thread landed from 2001zhaozhao:

“It’s a bit amusing that coding agents rely on drawing 1000W+ and using 2TB+ of memory in a datacenter to run, yet people really focus on the last few watts and few hundred megabytes of memory on their laptop (which get dwarfed by the energy cost of compiling their code anyways).”

This is technically correct. The model does not run on your machine. The inference is somewhere in a data center, and the energy bill per request dwarfs whatever your laptop client is doing. Whether your local process uses 8MB or 300MB is noise by comparison.

But I think the counter-counter-argument is also right: local client performance is about the feel of a tool, not global energy accounting. A tool that spins at 2% CPU when you are not using it, that takes four seconds to tell you its own version number - that tool is signaling something about the assumptions its authors made. Those assumptions were not mine.

Should you try it?

Read the GitHub README if you: already use a terminal-based agent and want something that does not idle at 2% CPU, are on a machine where 300MB is actually noticeable, want to switch LLM providers without switching tools, or are curious how a solo dev built a full agent stack in ~7k lines.

Skip it for now if: you rely on Claude Code’s VS Code integration, need tested Windows support (zerostack explicitly does not test this), or your workflow depends on something provider-specific.

The install is one command:

cargo install zerostack
export OPENROUTER_API_KEY="your-key"
zerostack

One commenter (hiAndrewQuinn) ran zerostack’s entire codebase through another agent to check for concerning patterns and found nothing noteworthy. That is a nice property of a small, readable codebase.

There’s also a sandbox mode - install bubblewrap and pass --sandbox to run every bash command in an isolated environment. That’s the kind of feature that suggests the author has thought about what could go wrong.


Discussion on Hacker News · Source: crates.io · Submitted by gidellav

Hoang Yell

A software developer and technical storyteller. I read Hacker News every day and retell the best stories here — in English and Vietnamese — for curious people who don't have time to scroll.