haze

haze a minimal coding agent for your terminal

Install haze and run it in a project.
Use /provider for setup, then start chatting.
Build workflows with /skills.

Optimized context for local LLMs.
Minimal guard rails, no permission hell.

haze~/api-service
You asked find the session leak, fix it, and add a regression test
Tool
5 calls · 2 changes · 0.3s
✓ grep sessionStore · 38 matches
✓ readFile src/middleware/session.ts · 142 lines
✓ editFile src/middleware/session.ts · +6 -2
✓ writeFile tests/session-eviction.test.ts · new file
✓ shell npm test · 128 passed
haze · ✓ Done in 0.4s · 22 tok/s
  • •Root cause: expired sessions remained in sessionStore after their TTL.
  • •Fix: added bounded cleanup in src/middleware/session.ts.
  • •Regression test: verifies expired sessions are evicted.

The full test suite passes.

Measured against the harnesses you know

Input tokens per solved task

lower is better · cache reads included · lower context per step means cheaper long sessions

nanocoder90,422
haze92,320
pi101,817
claude-code549,062

Agent wall time per solved task

seconds · same task, same model, same backend for all four harnesses

pi149 s
haze187 s
nanocoder233 s
claude-code290 s

Tool calls per solved task

total calls · haze reached the same result with 6 distinct tools, the others with 3–4

haze11
pi13
nanocoder14
claude-code19

Shell invocations

shell calls only · in haze, file tools did the implementation and shell only validated

haze3
pi7
nanocoder9
claude-code12

Harbor differential benchmark, csv-query task (RFC-4180 CSV CLI, 17 verifier tests), 2026-08-16: haze 1.0.0 passed 17/17 like claude-code, nanocoder, and pi — every harness ran the identical glm-5.3 model on the same backend, so differences isolate the harness. haze's 11 calls were readFile×3, listFiles×2, writeFile×1, editFile×1, shell×3, readToolOutput×1 — the bash-driven harnesses leaned on the terminal for both implementation and testing. haze completed in one goal cycle with structured passing validation and zero stalls. Full report with the per-step trajectory: benchmarks/harbor/results.

Built for autonomous workflows

  • Skills are plain Markdown

    Skills are haze's most powerful extension point. Describe a workflow, refine the LLM-generated draft, and store it globally or with a repository. The model loads matching skills from user intent, or you can invoke one as a slash command.

    /skills
    › code-review    project
      deploy-check   project
      add skill      describe a new skill for haze to generate
  • Repository-native tools

    Discover, read, search, edit, and write code with explicit workspace boundaries. Add LSP navigation or MCP tools when the built-ins are not enough.

    ✓ grep      createSession  12 matches
    ✓ readFile  src/session.ts 184 lines
    ✓ editFile  src/session.ts +8 -3
  • Work you can resume

    Resume or fork a workspace session with its goal, touched files, validation evidence, blockers, and next action intact.

    /resume
    › auth-refactor    18 messages · 2m ago
      dashboard-fix   12 messages · yesterday
      release-prep    9 messages · 3d ago
  • Parallel, isolated workers

    Split independent work across fresh subagent contexts. Concurrency is bounded, file writes are serialized, and the main conversation stays focused.

    /fleet migrate four packages
    ✓ subagent packages/web     migrated
    ✓ subagent packages/admin   migrated
    ✓ subagent packages/mobile  migrated
    ✓ subagent packages/cli     migrated
  • Commands that stay alive

    Run tests and builds in the foreground, or keep up to five managed dev servers and watchers alive while the agent works.

    ✓ shell    npm run dev
      background-1 running on :3000
    ✓ process  output background-1
  • Automation without the TUI

    Run haze -p from scripts and CI with text, JSON, or streaming JSON output plus a reliable process exit status. Version 1.2.x adds provider-usage context accounting, recoverable compact-and-retry overflow handling, and validation evidence hardened against masked shell failures — hardened further by a repository-wide review pass in 1.2.1.

    $ haze -p "audit auth" \
      --model ollama:qwen3.6:35b-a3b \
      --output json
    { "status": "complete", "findings": 2 }

Minimal guardrails and context

Workspace boundaries without approval loops

Mutating tools stay inside the current working directory, and file discovery respects .gitignore by default. Explicit @path references add read-only context. Secret files — SSH keys, shell histories, .env files, credentials — are refused outright by every file tool, before any read, and show as blocked: protected secret file in the transcript. Images are attached only when the selected provider supports vision. There is no sandbox or permission layer: shell commands run with your access, so haze is a supervised tool — run it where you would run a shell session yourself, not as an unattended runtime.

workspace   current directory
.gitignore  respected by default
.env/.ssh   always refused
@ui.png    attached for vision

A small model-facing footprint

haze's base system prompt is about 1.1k tokens, compared with 20k+ for Claude Code. Request context and tool responses are aggressively bounded or compacted, while large raw outputs remain retrievable by handle. Provider-reported usage re-anchors context estimates, curated limits cover known model families, and overflow recovery compacts and retries before leaving a resumable checkpoint.

system prompt  ~1.1k tokens
tool output    bounded · retrievable
sessions       compactable

Instructions at every scope

haze reads user-level guidance from ~/.haze/AGENTS.md or ~/.claude/CLAUDE.md, then discovers root and nested repository instructions as it works. Create a root AGENTS.md with /init. Clear the current conversation and task list with /clear.

/init   create root AGENTS.md
/clear  clear conversation and tasks

Bring your own model

Ollama and LM Studio run locally without an API key. For hosted inference, haze includes presets for OpenRouter, OpenAI, Mistral, DeepSeek, xAI, and other OpenAI-compatible endpoints; most need only an API key. OpenAI supports both platform API keys and browser sign-in with a supported ChatGPT subscription. You can also connect a custom OpenAI-compatible API. haze is optimized for local inference. Configure a provider with /provider, then select a model with /model.

Common questions

Do I need a haze account or subscription?

No. Install the CLI and connect an OpenAI-compatible endpoint. Use a hosted API with your own key or a local endpoint without one.

Will it follow an existing repository's conventions?

Yes. haze reads ancestor and nested AGENTS.md or CLAUDE.md instructions as it enters each subtree. The current workspace remains the mutation boundary.

Will I spend the session approving tool calls?

No. haze does not pause before every file read, edit, or shell command. It keeps mutations inside the current workspace and lets the agent finish its tool loop. Watch the transcript and supervise consequential work as you would any shell session.

What does haze trust?

haze trusts you and your global configuration. Repository content, fetched pages, project skills, MCP/LSP output, and model output are untrusted. There are no command confirmation gates, so supervise consequential work and review debug logs before sharing them.

Can I change how haze looks?

Yes. /themes picks from 14 built-in palettes — the default purple, a light mode, and oh-my-zsh ports like robbyrussell and solarized-dark — and applies the choice immediately; /themes <name> sets one directly. The selection is saved to ~/.haze/settings.json. A theme owns both terminal defaults (haze adopts its foreground/background on start and restores yours on exit), so light palettes stay readable.

Is the useful part actually open source?

Yes. The CLI is MIT licensed, with its agent loop, local tools, sessions, skills, subagents, LSP, MCP, and headless mode in the public repository.

Give haze a real task.

Install once, open any project directory, run haze, and choose your provider and model.

Start in under five minutes