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.
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
Same Simulation, Different Evidence: Where Retrieved Tool Output Costs LLM Agents Accuracy
Saving long tool output to files cut GPT-5.1 accuracy by 11.3 points; naming the authoritative file restored it.
Fake News, Real Crashes: Information Injection Attacks on LLM Financial Trading Agents
Fake headlines hijacked LLM trading agents 62% of the time versus 14% for prompt injection.
Harness Engineering 101: The LLM is the brain, the harness is the body
An agent is a loop managing a JSON array; 16 chapters build one from scratch
Harness2 by Google Research – Recursive Agent Harnessing
Recursively refining the harness with fixed model weights raised benchmark scores by up to 11.8 points.
Ousted Savannah police officer gave ICE agent husband access to Flock system
A police officer shared her Flock login with her ICE-agent husband; an audit found 983 searches and she was fired
Tmux and Claude Code: Sessions, Send-Keys, and the Ceiling
Running Claude Code agents in tmux works well, but limits appear around four agents.