Hax – a minimalist, terminal-native coding agent written in C
TL;DR Highlight
A tiny single-binary C coding agent for the terminal that works out of the box with local models
Who Should Read
Terminal-focused developers who want to run a coding agent on local models (llama.cpp) without a heavy tool
Core Mechanics
- Single C binary, very light
- It is one native C binary with few dependencies.
- It starts instantly and uses only a few MB of memory.
- That leaves more RAM for local models.
- Local models are first-class
- It auto-discovers the model and runtime capabilities.
- The default setup needs no custom provider config block.
- Run llama-server, then hax --provider llama.cpp.
- It doesn't mess with your terminal
- Streaming Markdown and tool output are reflowed for the terminal.
- Only the streaming line or input area is redrawn, so native scrollback is kept.
- You can inspect what was sent
- Ctrl+T shows what was sent to the model and what it replied.
- A detailed wire protocol trace is optional.
- Broad provider support
- OpenAI and compatible, Anthropic and compatible are supported.
- Codex via ChatGPT subscription, OpenRouter, OpenCode Zen/Go and llama.cpp also work.
- Some features are left out on purpose
- No MCP marketplaces, plugin runtime, IDE panels or per-command permission prompts.
- Extension is via subprocesses instead of plugins.
- docs/philosophy.md explains each omission.
Community Reactions
- Used with deepseek-flash via the Anthropic-compatible provider
- A commenter built a Rust project they had put off for months.
- Cost was 1 US cent and setup took under 10 minutes.
- Tried on macOS with llama.cpp
- A commenter built and installed it and found it clean and fast with local models.
- Opinion on model bias toward their own agents
- A commenter says models are finetuned around their vendors' agents.
- Opus reportedly wants specific bash tools and writes Python calling bash if they are hidden.
- Skepticism about C
- One commenter questioned starting a new project in C.
- Another confirmed interrupt handling lives in interrupt.c.
How to Apply
- Hook hax up to llama.cpp
- Install with brew install oleksandrchekhovskyi/hax/hax.
- Start llama-server -m model.gguf and run hax --provider llama.cpp.
- Ask for a small edit in a project folder.
- Use one-shot mode in scripts
- Run hax -p "list TODOs" to get only the final answer on stdout.
- Pipe it into other tools or cron jobs.
- Debug prompts with Ctrl+T
- When the agent misbehaves, open the transcript.
- Check what was actually sent and fix the system prompt or tool output.
Try It
# Paste into a terminal (macOS/Linux, with llama.cpp)
brew install oleksandrchekhovskyi/hax/hax
# In another terminal, start the local model server
llama-server -m {{model}}.gguf
# Run in your project folder
cd {{project}}
hax --provider llama.cpp -p "list TODOs"
# Next: run hax interactively and press Ctrl+T to view the transcriptTerminology
Related Papers
Frostbite: A new CPU architecture discovered, designed and verified by AI
AI agents designed a CPU from scratch, claiming 4.59x perf/W over a traditional core
Restricting AI agents in mobile operating systems platforms from capturing data
Signal now blocks OS-level AI agents from reading its screen on iOS 27 and Android
Actions Speak Louder than Words: Stateful Privacy Sniffing of LLM Agents via Behavioral Covert Channels in Web Interactions
Agents' link choices alone let attackers rebuild user queries at F1 0.89; SOR cuts it to 0.39.
Tracking and Limiting Unsupported Claim Propagation in Multi-Agent LLM Systems: A Provenance-Aware Framework
Passing claims with source, evidence and history kept equivalence at 5 agent stages at 96% versus 31%.
LLM assisted reverse engineering
Pointing an agent at binaries with skills and MD notes made years-long hacks feasible
Metrics-in-the-Loop: Complexity Feedback Reshapes Agent-Written Code
Injecting per-turn complexity reports into coding agents cut code erosion without changing correctness
Why is Gemini 4 Carbon taking so long?
Carbon took nearly an hour on bug fixes that Astra and Opus finished in minutes, mostly from extra unrequested work.
Weight-Space Programming builds neural networks like a 1990s researcher
LLM hand-wrote MNIST weights to 91.3%, using 1990s-style techniques