cd /news/ai-agents/show-hn-zerostack-an-open-coding-age… Β· home β€Ί topics β€Ί ai-agents β€Ί article
[ARTICLE Β· art-21713] src=gi-dellav.github.io β†— pub= topic=ai-agents verified=true sentiment=↑ positive

Show HN: Zerostack, an open coding agent optimized for memory footprint

A new open-source coding agent called Zerostack, written in Rust, has been released with a memory footprint of approximately 16 MB average and 24 MB peak, compared to roughly 700 MB for JavaScript-based agents. The tool supports multiple AI providers, includes a terminal UI, permission system, and session management, and is available for installation via Cargo or pre-built binaries on GitHub.

read4 min views15 publishedJun 4, 2026

Overview #

Minimal coding agent written in Rust β€” ~16k LoC, 26MB binary, ~16 MB RAM (avg), ~24 MB (peak). Peak RAM ~24 MB vs ~700 MB for JS-based agents. CPU: 0.0% idle, ~1.5% under load.

Multi-providerβ€” OpenRouter, OpenAI, Anthropic, Gemini, Ollama, plus custom providers** Standard tools**β€” all tools exposed to coding agents (as described by opencode)** Permission system**β€” 5 modes, per-tool patterns, session allowlists** Terminal UI**β€” crossterm, markdown rendering, mouse support, scrollback** Prompts system**β€” 10 built-in prompts, switchable at runtime** Session management**β€” save/load/resume, auto-compaction** MCP support**β€” connect external tool servers** Ralph Wiggum loops**β€” iterative coding for long-horizon tasks** Git Worktrees**β€” branch-per-task workflow** ACP support**(gated) β€” editor integration (Zed, etc.)** Persistent memory**(gated) β€” plain-Markdown memory across sessions** Subagents**β€” parallel, fast codebase exploration** ARCHITECTURE.md**β€” shared core knowledge for all agents on the same codebase** Sandbox mode**β€” bubblewrap / zerobox isolation** Exa search**β€” WebFetch & WebSearch tools

zerostack-general roomon Matrix.

Prompts #

Built-in system prompts that change the agent's behavior and tone β€” switch at runtime with /prompt

:

Prompt Description
code Coding mode with full file & bash access, TDD workflow
plan Planning-only β€” explores and produces a plan without code
review Code review for correctness, design, testing, and impact
debug Finds root cause before proposing fixes
ask Read-only mode β€” no writes or bash
brainstorm Design-only β€” explores ideas without code
frontend-design Distinctive, production-grade UI
review-security Finds exploitable vulnerabilities
simplify Refines for clarity without behavior change
write-prompt Creates and optimizes agent prompts

Custom prompts can be created by placing markdown files in $XDG_CONFIG_HOME/zerostack/prompts/

.

Permissions #

Mode CLI Behavior
restrictive -R Ask for every operation
readonly --read-only Read/grep/list only. Deny writes, edits, bash
guarded --guarded Allow reads. Ask for writes, edits, bash
standard (default) Allow path tools within CWD. Safe bash auto-allowed
yolo --yolo Allow everything, prompt for destructive commands

Per-tool granular glob patterns, session allowlists, and doom-loop detection prevent runaway agents. The --dangerously-skip-permissions

flag bypasses all checks.

Commands #

/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

/helpβ€” Show all commands

Quick Start #

export OPENROUTER_API_KEY="[api_key]"

zerostack

zerostack --no-color

zerostack -p "Explain this project"

zerostack -c

zerostack --provider openrouter --model deepseek/deepseek-v4-flash

Installation #

Requires Cargo and git:

cargo install zerostack

cargo install zerostack --features acp

cargo install zerostack --features memory

cargo install zerostack --features multithread

Pre-built binaries are also available on GitHub Releases.

Once installed, run /prompt autoconfig

inside zerostack to configure the tool interactively.

Optional: Sandbox

apt install bubblewrap

dnf install bubblewrap

pacman -S bubblewrap

Parallel Agent #

Run multiple zerostack agents on the same repository simultaneously without manual git worktree management.

zerostack --parallel

Each parallel agent operates in a temporary git worktree. Changes are merged and the worktree is removed when the agent exits.

ACP (Agent Communication Protocol) #

With the acp

feature, zerostack acts as an ACP Agent server, allowing editors like Zed to connect to it as a coding agent backend:

zerostack --acp

zerostack --acp --acp-host 0.0.0.0 --acp-port 7243

Providers #

OpenRouter(default)** OpenAI-compatible**(vLLM, LiteLLM, etc.)** AnthropicGeminiOllama**

Custom providers can be configured with any base URL and API key environment variable.

Sessions #

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.

── more in #ai-agents 4 stories Β· sorted by recency
── more on @zerostack 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain β€” perfect for shipping the agent you just read about.

$git push zahid main
β†’ Live at https://your-agent.zahid.host βœ“
Get free account β†’ Pricing
from €0/mo Β· no card required
LIVE [news/show-hn-zerostack-an…] indexed:0 read:4min 2026-06-04 Β· β€”