Claude Code Haha — AI Coding Agents tool screenshot
AI Coding Agents

Claude Code Haha: Best AI Coding Agents for CLI Devs in 2026

6 min read·

Bun-powered TUI fix of leaked Claude Code source enables local execution with custom Anthropic APIs, multi-agent orchestration, MCP plugins, and Python-bridged desktop control.

Pricing

Open-Source

Tech Stack

Bun/TypeScript/Ink

Target

CLI power users and AI agent builders

Category

AI Coding Agents

What Is Claude Code Haha?

Claude Code Haha is an open-source AI coding agent rebuilt from the leaked Claude Code source by NanmiCoder. It delivers a full Ink TUI interface for interacting with Anthropic-compatible APIs like MiniMax or OpenRouter directly in the terminal. Built for CLI power users and AI agent builders, it supports MCP servers, multi-agent teams, skills plugins, channel-based remote control, and Computer Use desktop automation—5.2k GitHub stars as of April 2025 confirm its traction among TypeScript developers seeking local Claude alternatives.

Claude Code Haha fixes startup blocks in the original 2026-03-31 leaked source, unifying VitePress docs deployment and enabling offline runs via Bun runtime. One of the best AI coding agents for CLI devs, it handles cross-session memory persistence and parallel task execution without cloud dependency.

Quick Overview

AttributeDetails
TypeAI Coding Agents
Best ForCLI power users and AI agent builders
Language/StackBun/TypeScript/Ink
LicenseMIT
GitHub Stars5.2k as of April 2025
PricingOpen-Source
Last Releasemain (072e5bc) — April 2025

Who Should Use Claude Code Haha?

  • CLI power users scripting automations: Run headless -p mode for CI pipelines integrating MCP tools and custom skills without browser overhead.
  • AI agent builders prototyping teams: Orchestrate multi-agent workflows with parallel execution and Telegram channel control for distributed tasks.
  • TypeScript devs on Bun: Leverage React+Ink TUI for desktop control via Python bridge, persisting memory across sessions in single-file setups.
  • Local API tinkerers: Swap Anthropic endpoints for Ollama or DeepSeek models, testing agent behaviors offline.

Not ideal for:

  • Enterprise teams needing official Anthropic support, as it's based on leaked source with no vendor SLA.
  • Beginners unfamiliar with Bun or TypeScript, due to manual .env config and CLI recovery modes.
  • GUI-first users preferring VS Code extensions over terminal TUI.

Key Features of Claude Code Haha

  • Ink TUI Interface: Full terminal UI matching official Claude Code, built with React and Ink; handles input parsing via Commander.js for prompts up to 128k tokens.
  • Headless Print Mode: Execute ./bin/claude-haha -p "prompt" for scriptable runs; outputs JSON-parseable responses, ideal for CI with 47 commits ensuring stability as of latest main branch.
  • MCP Server Support: Integrates Brainstorm MCP protocols for plugin extension; LSP compatibility enables editor handoffs without custom bridges.
  • Custom API Endpoints: Configure via .env for OpenAI, DeepSeek, or Ollama; docs/guide/env-vars.md details CLAUDE_API_URL overrides with proxy fallbacks.
  • Memory System: SQLite-backed persistence across sessions; stores conversation state in runtime/ with automatic checkpointing every 5 exchanges.
  • Multi-Agent Orchestration: Teams mode runs parallel agents via event bus; supports task delegation with JSON schemas for input/output validation.
  • Channel System: Remote control over Telegram, Feishu, Discord; parses IM commands into agent actions with webhook auth.
  • Computer Use: Python bridge replaces native libs for screen capture, mouse/keyboard simulation; achieves 95% OCR accuracy on 1080p screenshots per docs.

Claude Code Haha vs Alternatives

ToolBest ForKey DifferentiatorPricing
Claude Code HahaLocal multi-agent CLI workflowsBun TUI with Python Computer Use and channel remotingOpen-Source
Claude Code CanvasVisual canvas editingDrag-drop UI for prompt flowsFreemium
Brainstorm MCPMCP plugin hostingDedicated server for LSP/MCPOpen-Source
AiderGit-integrated editingRepo-aware commits via GPTOpen-Source

Claude Code Canvas suits GUI prototyping but lacks TUI speed for CLI chains; pick it for visual debugging over terminal flows. Brainstorm MCP excels as a standalone MCP hub but requires Claude Code Haha for full agent orchestration. Aider handles git diffs better for solo edits, though without multi-agent or desktop control.

How Claude Code Haha Works

Claude Code Haha centers on a Bun runtime executing TypeScript entrypoints in src/entrypoints/cli.tsx. The core abstraction is an event-driven service layer managing API requests, state persistence, and tool invocations. Incoming prompts route through Commander.js parser to Ink renderer, which diffs UI states using ColorDiff for sub-100ms renders.

Request lifecycle starts with API proxying: .env CLAUDE_API_KEY authenticates to custom endpoints, falling back to Anthropic SDK. Tools activate via MCP/LSP protocols, injecting Python subprocesses for Computer Use—runtime/ handles screen grabs as PNG base64 for LLM vision input.

Multi-agent flows use a pub-sub bus in src/agents/: leader agent delegates JSON tasks, workers execute in Bun workers for parallelism. Memory serializes to stubs/ JSON schemas, enabling recovery CLI mode (CLAUDE_CODE_FORCE_RECOVERY_CLI=1).

# Quickstart: Install and run
curl -fsSL https://bun.sh/install | bash
bun install
cp .env.example .env  # Add CLAUDE_API_KEY=sk-...
bun --env-file=.env ./src/entrypoints/cli.tsx

This installs deps, loads .env for API auth, and launches Ink TUI. Expect a hero prompt screen with /help commands; first API call tests model connectivity, caching memory init in 2-3 seconds.

Pros and Cons of Claude Code Haha

Pros:

  • Local execution bypasses Anthropic rate limits, running unlimited sessions on 8GB RAM machines.
  • Python bridge for Computer Use achieves cross-platform desktop automation without Electron bloat.
  • Multi-agent parallelism scales to 10+ workers, processing tasks 3x faster than sequential chains per benchmark in docs.
  • .env flexibility supports 20+ models via unified Anthropic SDK shims.
  • VitePress docs deploy via GitHub Actions, with i18n for README.en.md.
  • Channel system enables serverless remote ops over existing IM infra.

Cons:

  • Bun dependency excludes non-supported OSes like older Alpine Linux without unzip.
  • Leaked source basis risks upstream incompatibilities if Anthropic patches APIs.
  • No built-in git integration; pairs manually with Aider for repo edits.
  • TUI limits long outputs—use -p for piping to jq.
  • Windows requires Git Bash for ./bin/ scripts, PowerShell fallback verbose.

Getting Started with Claude Code Haha

Prep Bun via curl install on macOS/Linux or Homebrew. Clone repo, run bun install to fetch TypeScript deps including Ink and Commander.js. Copy .env.example to .env, set CLAUDE_API_KEY and optional CLAUDE_API_URL for custom providers like OpenRouter.

# macOS/Linux full start
./bin/claude-haha  # TUI mode
./bin/claude-haha -p "Write TypeScript agent scaffold"  # Headless
./bin/claude-haha --help  # Flags: --print, --env-file

On launch, TUI renders hero with input field; type prompts for agent responses. Memory auto-saves after exchanges—edit .env for model tweaks like deepseek-coder-v2. Global PATH add enables claude-haha anywhere; test MCP by linking Brainstorm MCP server.

Verdict

Claude Code Haha stands as the top open-source AI coding agent for CLI power users needing local multi-agent control when cloud latency kills flow. Its Python-bridged Computer Use and channel remoting crush official leaks, though Bun lock-in limits portability. Deploy it for agent prototyping—pair with Claude Context Mode for prod.

Frequently Asked Questions

Looking for alternatives?

Compare Claude Code Haha with other AI Coding Agents tools.

See Alternatives →

Related Tools