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 askedfind 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.

Harbor benchmark snapshot

One real NodeBB bug · GLM-5.3-Flash · low reasoning requested

2026-11-21 · Harbor 0.27.0

Input tokens

includes cache reads · agent accounting differs

haze134,902
claude-code263,048
codex294,037
pi744,706

Cache-read tokens

included within input tokens · not additional tokens

haze121,728
claude-code245,632
codex274,432
pi718,464

Output tokens

reported generation · accounting differs

haze2,500
claude-code2,732
codex4,072
pi11,454

Tool calls

calls captured in agent trajectories

haze13
claude-code18
codex19
pi59

Agent wall time

seconds · excludes setup and verification

claude-code75 s
haze86 s
codex113 s
pi353 s

SWE-bench Pro NodeBB plugin-ID task with haze 1.7.12, Pi 0.73.1, Codex 0.171.0 and Claude Code 2.1.330. Provider protocols and token accounting differ; provider-side reasoning effort was not independently verified.

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. A persistent code graph answers orientation questions in large repos; add LSP navigation or MCP tools when the built-ins are not enough.

    ✓ grep       createSession  12 matches
    ✓ graphQuery session eviction 9 nodes · 2 hops
    ✓ 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. Control reasoning per run with --reasoning; 1.5.1 gates effort by endpoint capability and omits unsupported GPT-6+ choices instead of promoting them. Since 1.6.0, idle-stream stall windows are class-aware — 30 minutes for local inference servers, 5 minutes hosted, overridable via streamIdleTimeoutMs — so slow-burning local models are not aborted mid-work. Interactive width changes replay settled history and formatted Markdown while preserving drafts and active turns.

    $ 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