zerostack
an open coding agent optimized for memory footprint
Last verified:
What is zerostack?
Zerostack is a minimal coding agent written in Rust, designed for developers who need an AI-powered coding assistant with an extremely low memory footprint. The tool is approximately 16k lines of code, has a 26MB binary size, and uses only ~16 MB RAM on average (~24 MB peak), compared to ~700 MB for JavaScript-based agents. It features 0.0% CPU usage at idle and ~1.5% under load, making it ideal for machines with limited resources.
Key features include multi-provider support (OpenRouter, OpenAI, Anthropic, Gemini, Ollama, and custom providers), a comprehensive permission system with 5 modes, a Terminal UI with crossterm and markdown rendering, 10 built-in switchable prompts, session management with save/load/resume capabilities, MCP support for external tool servers, Ralph Wiggum loops for iterative coding on long-horizon tasks, Git Worktrees for branch-per-task workflows, ACP support for editor integration (Zed, etc.), persistent memory across sessions, subagents for parallel codebase exploration, ARCHITECTURE.md for shared core knowledge, sandbox mode with bubblewrap/zerobox isolation, and Exa search for WebFetch and WebSearch tools.
Zerostack is designed for developers, particularly those working on Unix-like systems, who value performance, memory efficiency, and open-source software. It appeals to Rust developers, developers with older or resource-constrained machines, privacy-conscious users who want local control, and anyone frustrated with heavy AI coding tools that consume excessive RAM and CPU. The tool is open-source under GPL-3.0-only license.
The agent supports standard coding agent tools as described by opencode, includes doom-loop detection to prevent runaway agents, and offers parallel agent execution where multiple zerostack instances can run on the same repository simultaneously without manual git worktree management. Each parallel agent gets a temporary git worktree that is merged and cleaned up on exit.
zerostack pricing
Pricing model: Freemium
Zerostack is completely free and open-source under GPL-3.0-only license. There are no paid plans or subscription tiers. The tool itself is free, but users need to provide their own API keys for AI providers (OpenRouter is default, but OpenAI, Anthropic, Gemini, Ollama, and custom providers are supported). API usage costs depend on the provider and model chosen by the user.
zerostack pros
- Extremely low memory usage (~16 MB avg, ~24 MB peak vs ~700 MB for JS agents)
- Minimal CPU usage (0.0% idle, ~1.5% under load)
- Small binary size (26MB) and codebase (~16k LoC)
- Multi-provider support (OpenRouter, OpenAI, Anthropic, Gemini, Ollama, custom)
- 5 permission modes from restrictive to yolo with granular control
- 10 built-in prompts switchable at runtime for different tasks
- Session management with save/load/resume and auto-compaction
- MCP support to connect external tool servers
- Git Worktrees for automatic branch-per-task workflow
- ACP support for editor integration with Zed and others
- Parallel agent execution on same repository without manual worktree management
- Subagents for fast parallel codebase exploration
- Sandbox mode with bubblewrap/zerobox isolation for safety
- Terminal UI with crossterm, markdown rendering, mouse support, scrollback
- Persistent memory across sessions in plain Markdown format
- Exa search integration for WebFetch and WebSearch tools
- Open-source under GPL-3.0-only license
- Ralph Wiggum loops for iterative coding on long-horizon tasks
- Pre-built binaries available on GitHub Releases
- Doom-loop detection prevents runaway agents
zerostack cons
- Requires Cargo and git for installation from source
- ACP feature is gated and must be enabled during installation
- Persistent memory feature is gated and must be enabled during installation
- Multi-threaded subagents are experimental and require feature flag
- Sandbox mode requires separate bubblewrap installation
- Primarily CLI/TUI based, no native GUI application
- Custom providers require manual configuration of base URL and API key
- New project (released May 2026) with limited community adoption
Frequently asked questions about zerostack
What is Zerostack?
Zerostack is a minimal coding agent written in Rust, optimized for memory footprint and performance. It has approximately 16k lines of code, a 26MB binary size, and uses only ~16 MB RAM on average (~24 MB peak), compared to ~700 MB for JavaScript-based agents. It provides AI-powered coding assistance with standard tools exposed to coding agents.
How do I install Zerostack?
Zerostack requires Cargo and git. You can install it with 'cargo install zerostack' for the default version with MCP, loop, git-worktree, and subagents. Optional features include 'cargo install zerostack --features acp' for editor integration, '--features memory' for persistent memory, and '--features multithread' for experimental multi-threaded subagents. Pre-built binaries are also available on GitHub Releases.
What are the permission modes in Zerostack?
Zerostack has 5 permission modes: restrictive (-R) asks for every operation, readonly (--read-only) allows read/grep/list only and denies writes/edit/bash, guarded (--guarded) allows reads and asks for writes/edit/bash, standard (default) allows path tools within CWD with safe bash auto-allowed, and yolo (--yolo) allows everything but prompts for destructive commands. Per-tool granular glob patterns and session allowlists are also supported.
What built-in prompts are available?
Zerostack has 10 built-in prompts: code (coding mode with full file & bash access, TDD workflow), plan (planning-only without code), review (code review for correctness, design, testing, impact), debug (finds root cause before proposing fixes), ask (read-only mode with no writes or bash), brainstorm (design-only without code), frontend-design (distinctive production-grade UI), review-security (finds exploitable vulnerabilities), simplify (refines for clarity without behavior change), and write-prompt (creates and optimizes agent prompts). Switch at runtime with /prompt command.
How do I run multiple agents on the same repository?
Use the --parallel flag: 'zerostack --parallel'. Each parallel agent operates in a temporary git worktree, and changes are merged and the worktree is removed when the agent exits. This eliminates the need for manual git worktree management when running multiple zerostack agents simultaneously on the same repository.
What is ACP support in Zerostack?
ACP (Agent Communication Protocol) support is a gated feature that allows zerostack to act as an ACP Agent server, enabling editors like Zed to connect to it as a coding agent backend. Use 'zerostack --acp' for stdio mode (editor spawns as subprocess) or 'zerostack --acp --acp-host 0.0.0.0 --acp-port 7243' for TCP mode. Install with 'cargo install zerostack --features acp' to enable this feature.
How do I resume a previous session?
Sessions are saved to '$XDG_DATA_HOME/zerostack/sessions/'. Use '-c' to resume the most recent session, '-r' to browse and select one, or '--session <id>' to load a specific session. You can also use the /session command inside zerostack to list, save, and load sessions. Session management includes auto-compaction feature.
What is sandbox mode in Zerostack?
Sandbox mode provides isolation using bubblewrap or zerobox for safety when running untrusted code or commands. You need to install bubblewrap separately: 'apt install bubblewrap' for Debian/Ubuntu, 'dnf install bubblewrap' for Fedora, or 'pacman -S bubblewrap' for Arch. This adds an extra layer of security when using the coding agent.
What commands are available in Zerostack's TUI?
Available commands include: /model (switch model), /thinking (set thinking level), /clear (clear conversation), /session (list/save/load sessions), /loop (schedule recurring prompts), /prompt (list or change system prompt), /mode (set permission mode), /worktree (create git worktree and move into it), /wt-merge (merge worktree branch, push, clean up, return), /wt-exit (return to main repo without merging), and /help (show all commands). Run '/prompt autoconfig' inside zerostack after install to explore docs interactively.