← Back to Blogs
HN Story

Zerostack: A High-Performance, Rust-Powered Coding Agent

May 18, 2026

Zerostack: A High-Performance, Rust-Powered Coding Agent

The landscape of AI coding agents is rapidly expanding, but many current implementations suffer from significant resource bloat. Tools built on JavaScript or TypeScript often consume gigabytes of RAM and introduce noticeable latency, which can be a major friction point for developers on lower-end hardware or those running multiple agents in parallel.

Enter Zerostack, a minimal coding agent written in pure Rust. Inspired by projects like pi and opencode, Zerostack aims to provide the core utility of an AI coding assistant—file manipulation, bash execution, and session management—without the overhead associated with modern scripting runtimes. By leveraging Rust's performance and memory safety, Zerostack offers a lightweight alternative that feels more like a native Unix tool than a heavy application.

Extreme Efficiency by Design

The most striking aspect of Zerostack is its resource footprint. While some users have reported that competitors like Claude Code or OpenCode can consume several gigabytes of RAM on large projects, Zerostack operates on a different scale:

  • Binary Size: ~8.9MB
  • RAM Usage: ~8MB on an empty session, peaking around 12MB during active work.
  • CPU Overhead: 0.0% at idle and approximately 1.5% during tool execution.
  • Codebase: A lean ~7k lines of code.

This efficiency isn't just about saving laptop battery; it enables developers to run multiple agents in parallel or deploy them in small cloud instances without worrying about memory leaks or system slowdowns.

Core Feature Set

Despite its small size, Zerostack includes a comprehensive suite of tools designed for professional software development:

Tooling and Integration

  • Multi-provider Support: It works with OpenRouter (default), OpenAI, Anthropic, Gemini, Ollama, and custom providers.
  • File System Tools: Includes capabilities for reading, writing, editing (via exact match with diff display), grepping, and directory listing.
  • MCP Support: The Model Context Protocol (MCP) allows Zerostack to connect to external servers for extended tooling.
  • Web Integration: Integrated Exa search provides WebFetch and WebSearch capabilities.

Advanced Workflows

  • Prompt System: Instead of complex "Skills," Zerostack uses a runtime-switchable prompt system. Users can toggle between modes like code (TDD workflow), plan (exploration), review (correctness/design), and debug (root cause analysis).
  • Loop System: An experimental feature for long-horizon tasks. The agent can iteratively work through a plan, run tests, and update its progress in a LOOP_PLAN.md file until the task is complete.
  • Git Worktrees: To avoid polluting the main branch, Zerostack integrates with Git worktrees. Users can create a task-specific worktree via /worktree, perform the work, and merge it back using /wt-merge.

Security and Control

Giving an LLM access to a bash shell is inherently risky. Zerostack addresses this through a tiered permission system:

  1. Restrictive: Every action requires manual approval.
  2. Standard: Safe commands (e.g., ls, git log) are auto-approved; destructive operations prompt the user.
  3. Accept-all: Auto-approves operations within the working directory.
  4. Yolo: Full automation without prompts.

For added security, Zerostack supports bubblewrap for sandboxing, ensuring that bash commands are executed in an isolated environment to protect the host system from accidental or malicious damage. It also includes "doom-loop detection" to prevent agents from repeating the same failing command indefinitely.

Community Perspectives and Critiques

While the Rust implementation is widely praised for its speed, the community has raised several points regarding the evolution of agent harnesses:

The "Harness" Debate

Some users argue that the performance of the harness is secondary to the quality of the agent's logic. As one commenter noted:

"Just because this is written in Rust won't solve the biggest issues most users have with coding agents... the problem is the harness quality and convincing the agents to do the exact things you need."

Others suggest that we are entering an era of "fragmented harnesses," where developers will build highly customized, minimal tools tailored to their specific workflows rather than relying on a one-size-fits-all platform.

Extensibility vs. Simplicity

A recurring critique is the lack of a plugin system similar to pi. While Zerostack uses prompts to change behavior, some developers believe that the ability for an agent to self-mutate or load external extensions is the most critical feature for long-term utility.

Getting Started

Installing Zerostack requires Cargo and git. It can be installed via:

cargo install zerostack

To begin a session, set your API key (e.g., export OPENROUTER_API_KEY="your_key") and simply run zerostack. For those prioritizing security, installing bubblewrap and using the --sandbox flag is highly recommended.

References

HN Stories