Skip to content

πŸ‰ Hail Hydra β€” Multi-headed speculative execution framework for Claude Code. 7 AI agents, 3x faster, ~50% cheaper. Inspired by speculative decoding.

License

Notifications You must be signed in to change notification settings

AR6420/Hail_Hydra

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

23 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Hail Hydra

πŸ‰ H Y D R A

Multi-Headed Speculative Execution for Claude Code

"Cut off one head, two more shall take its place."
Except here β€” every head is doing your work faster and cheaper.

Opus Sonnet Haiku

npm version

Speed Cost Quality Always On

7 agents Β Β·Β  7 slash commands Β Β·Β  3 hooks Β Β·Β  ~50% cost savings


🧬 What is Hydra?

You know how in the movies, Hydra had agents embedded everywhere, silently getting things done in the background? That's exactly what this framework does for your Claude Code sessions.

Hydra is a task-level speculative execution framework inspired by Speculative Decoding in LLM inference. Instead of making one expensive model (Opus 4.6) do everything β€” from searching files to writing entire modules β€” Hydra deploys a team of specialized "heads" running on faster, cheaper models that handle the grunt work.

The result? Opus becomes a manager, not a laborer. It classifies tasks, dispatches them to the right head, glances at the output, and moves on. The user never notices. It's invisible. It's always on.

Four built-in speed optimizations reduce overhead at every stage: speculative pre-dispatch (scout launches in parallel with task classification), session indexing (codebase context persists across turns β€” no re-exploration), fire-and-forget dispatch (non-critical agents run in the background without blocking downstream work), and confidence-based auto-accept (raw factual outputs skip Opus review entirely).

Think of it this way:

Would you hire a $500/hr architect to carry bricks? No. You'd have them design the building and let the crew handle construction. That's Hydra.


πŸš€ Installation

One command. Done.

npx hail-hydra-cc@latest

[OR]

npm i hail-hydra-cc@latest

Runs the interactive installer β€” deploys 7 agents, 7 slash commands, 3 hooks, and registers the statusline and update checker. Done in seconds.

Manual Install

# Clone the repo
git clone https://github.com/AR6420/Hail_Hydra.git
cd hydra

# Deploy heads globally (recommended β€” always on, every project)
./scripts/install.sh --user

# πŸ‰ Hail Hydra! Framework active in all Claude Code sessions.
# βœ… 7 agents  βœ… 7 commands  βœ… 3 hooks  βœ… StatusLine  βœ… VERSION

Installation Options

# User-level β€” available in ALL your Claude Code projects
./scripts/install.sh --user

# Project-level β€” just this one project
./scripts/install.sh --project

# Both β€” maximum coverage
./scripts/install.sh --both

# Check what's deployed
./scripts/install.sh --status

# Remove everything
./scripts/install.sh --uninstall

What Gets Installed

~/.claude/
β”œβ”€β”€ agents/                      # 7 agent definitions
β”‚   β”œβ”€β”€ hydra-scout.md           # 🟒 Haiku 4.5 β€” explore codebase
β”‚   β”œβ”€β”€ hydra-runner.md          # 🟒 Haiku 4.5 β€” run tests/builds
β”‚   β”œβ”€β”€ hydra-scribe.md          # 🟒 Haiku 4.5 β€” write documentation
β”‚   β”œβ”€β”€ hydra-guard.md           # 🟒 Haiku 4.5 β€” security/quality gate
β”‚   β”œβ”€β”€ hydra-git.md             # 🟒 Haiku 4.5 β€” git operations
β”‚   β”œβ”€β”€ hydra-coder.md           # πŸ”΅ Sonnet 4.6 β€” write/edit code
β”‚   └── hydra-analyst.md         # πŸ”΅ Sonnet 4.6 β€” debug/diagnose
β”œβ”€β”€ commands/hydra/              # 7 slash commands
β”‚   β”œβ”€β”€ help.md                  # /hydra:help
β”‚   β”œβ”€β”€ status.md                # /hydra:status
β”‚   β”œβ”€β”€ update.md                # /hydra:update
β”‚   β”œβ”€β”€ config.md                # /hydra:config
β”‚   β”œβ”€β”€ guard.md                 # /hydra:guard
β”‚   β”œβ”€β”€ quiet.md                 # /hydra:quiet
β”‚   └── verbose.md               # /hydra:verbose
β”œβ”€β”€ hooks/                       # 3 lifecycle hooks
β”‚   β”œβ”€β”€ hydra-check-update.js    # SessionStart β€” version check (background)
β”‚   β”œβ”€β”€ hydra-statusline.js      # StatusLine β€” status bar display
β”‚   └── hydra-auto-guard.js      # PostToolUse β€” file change tracker
└── skills/
    └── hydra/                   # Skill (Claude Code discoverable)
        β”œβ”€β”€ SKILL.md             # Orchestrator instructions
        β”œβ”€β”€ VERSION              # Installed version number
        β”œβ”€β”€ config/
        β”‚   └── hydra.config.md  # User configuration (created by --config)
        └── references/
            β”œβ”€β”€ model-capabilities.md
            └── routing-guide.md

> **Note:** `settings.json` is at `~/.claude/settings.json` β€” hooks and statusLine are registered there.

Project-level (--project): same files written to .claude/ in your working directory instead of ~/.claude/. Project-level takes precedence when both exist.


⚑ Slash Commands

Command Description
/hydra:help Show all commands and agents
/hydra:status Show installed agents, version, and update availability
/hydra:update Update Hydra to the latest version
/hydra:config Show current configuration
/hydra:guard [files] Run manual security & quality scan
/hydra:quiet Suppress dispatch logs for this session
/hydra:verbose Enable verbose dispatch logs with timing

πŸ–₯️ Status Line

After installation, your Claude Code status bar shows real-time framework info:

πŸ‰ β”‚ Opus β”‚ Ctx: 37% β–ˆβ–ˆβ–ˆβ–ˆβ–‘β–‘β–‘β–‘β–‘β–‘ β”‚ $0.42 β”‚ my-project
Element What It Shows
πŸ‰ Hydra is active
Model Current Claude model (Opus, Sonnet, Haiku)
Ctx: XX% Context window usage with visual bar
$X.XX Session API cost so far
Directory Current working directory

Context bar colors:

  • 🟒 Green (0–49%) β€” plenty of room
  • 🟑 Yellow (50–79%) β€” getting full, consider /compact
  • πŸ”΄ Red (80%+) β€” context nearly full, /compact or /clear recommended

Note: If you already have a custom statusLine configured, the installer keeps yours and prints instructions for switching to Hydra's.


πŸ”„ Auto-Update Notifications

Hydra checks for updates once per session in the background (never blocks startup). When a new version is available, you'll see it in the status bar:

πŸ‰ β”‚ Opus β”‚ Ctx: 37% β–ˆβ–ˆβ–ˆβ–ˆβ–‘β–‘β–‘β–‘β–‘β–‘ β”‚ $0.42 β”‚ my-project β”‚ ⚑ v1.1.0 available

Update with:

# From within Claude Code:
/hydra:update

# Or from your terminal:
npx hail-hydra-cc@latest --global

After updating, restart Claude Code to load the new files.


✨ Features

  • Seven specialized heads β€” Haiku 4.5 (fast) and Sonnet 4.6 (capable) heads for every task type
  • Auto-Guard β€” hydra-guard (Haiku 4.5) automatically scans code changes for security issues after every hydra-coder run
  • Configurable modes β€” conservative, balanced (default), or aggressive delegation via hydra.config.md
  • Slash commands β€” /hydra:help, /hydra:status, /hydra:update, /hydra:config, /hydra:guard, /hydra:quiet, /hydra:verbose for full session control
  • Quick commands β€” natural language shortcuts: hydra status, hydra quiet, hydra verbose
  • Custom agent templates β€” Add your own heads using templates/custom-agent.md
  • Session indexing β€” Codebase context persists across turns; no re-exploration on every prompt
  • Speculative pre-dispatch β€” hydra-scout launches in parallel with task classification, saving 2–3 seconds per task
  • Dispatch log β€” Transparent audit trail showing which agents ran, what model, and outcome

πŸ€” Why I Built This

After Opus 4.6 dropped, I noticed something frustrating β€” code execution felt slowww. Reallyyy Slow. Not because the model was worse, but because I was feeding everything through one massive model. Every file read, every grep, every test run, every docstring β€” all burning through Opus-tier tokens. The result? Frequent context compaction, more hallucinations, and an API bill that made me wince.

So I started experimenting. I switched to Haiku for the simple stuff β€” running commands, tool calls, file exploration. Sonnet for code generation, refactoring, reviews. And kept Opus only for what it's actually good at: planning, architecture, and the hard decisions. The result surprised me. Same code quality. Sometimes better β€” because each model was operating within a focused context window instead of one overloaded one.

Five agents. Five separate context windows. Each with a clearly defined job. They do the work, and only pass results back to the brain β€” Opus. The outcome:

  • Longer coding sessions (less compaction, less context blowup)
  • Drastically reduced API costs (Haiku 4.5 is 5Γ— cheaper than Opus 4.6)
  • Faster execution (Haiku 4.5 responds ~10Γ— faster)
  • Same or better code quality (focused context > bloated context)
  • Zero manual model switching (this is the big one)

Because that was the real pain β€” manually switching between models for every task tier to save costs. Every. Single. Time. So I built a framework that does it for me. And honestly? It does it better than I did. That was hard to admit, but here we are.

I also didn't want it to be boring. So I gave it teeth, heads, and a battle cry. If you prefer something more buttoned-up, the spec-exec branch has the same framework with zero theatrics.

Hail Hydra. Have fun.


πŸ’‘ The Theory (for nerds)

Speculative decoding (Chen et al., 2023) accelerates LLM inference by having a small draft model propose tokens that a large target model verifies in parallel. Since verifying K tokens costs roughly the same as generating 1 token, you get 2–2.5Γ— speedup with zero quality loss.

Hydra applies this at the task level:

                          β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                          β”‚  SPECULATIVE DECODING (tokens)  β”‚
                          β”‚                                 β”‚
                          β”‚  Small model drafts K tokens    β”‚
                          β”‚  Big model verifies in parallel β”‚
                          β”‚  Accept or reject + resample    β”‚
                          β”‚  Result: 2-2.5Γ— speedup         β”‚
                          β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                        β”‚
                                   Same idea,
                                  bigger scale
                                        β”‚
                                        β–Ό
                          β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                          β”‚  πŸ‰ HYDRA (tasks)               β”‚
                          β”‚                                 β”‚
                          β”‚  Haiku/Sonnet drafts the task   β”‚
                          β”‚  Opus verifies (quick glance)   β”‚
                          β”‚  Accept or redo yourself        β”‚
                          β”‚  Result: 2-3Γ— speedup           β”‚
                          β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

The math is simple: if 70% of tasks can be handled by Haiku 4.5 (10Γ— faster, 5Γ— cheaper) and 20% by Sonnet 4.6 (3Γ— faster, ~1.7Γ— cheaper), your effective speed and cost improve dramatically β€” even accounting for the occasional rejection.


πŸ—οΈ Architecture

User Request
    β”‚
    β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
    β”‚                                                      β”‚
    β–Ό                                                      β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”            β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  🧠 ORCHESTRATOR (Opus)     β”‚            β”‚  🟒 hydra-scout (Haiku 4.5)  β”‚
β”‚  Classifies task            β”‚            β”‚  IMMEDIATE pre-dispatch:      β”‚
β”‚  Plans waves                β”‚            β”‚  "Find files relevant to      β”‚
β”‚  Decides blocking / not     β”‚            β”‚   [user's request]"           β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜            β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
         β”‚         (unless Session Index already covers)  β”‚
         β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                β”‚ (scout + classification both ready)
                      [Session Index updated]
                                β”‚
    ════════════════════════════════════════════════════════
    Wave N  (parallel dispatch, index context injected)
    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
    β”‚  BLOCKING         β”‚  NON-BLOCKING (fire & forget)    β”‚
    β–Ό                   β–Ό                                  β”‚
 [coder]            [scribe] β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
    β”‚
    β–Ό
 Results arrive
    β”‚
    β”œβ”€β”€ Raw data / clean pass? β†’ AUTO-ACCEPT β†’ (updates Session Index if scout)
    └── Code / analysis / user-facing docs? β†’ Orchestrator verifies
         β”‚
         β–Ό
   User gets result  +  non-blocking outputs appended when ready

🐲 The Seven Heads

Head Model Speed Role Personality
hydra-scout (Haiku 4.5) 🟒 Haiku 4.5 ⚑⚑⚑ Codebase exploration, file search, reading "I've already found it."
hydra-runner (Haiku 4.5) 🟒 Haiku 4.5 ⚑⚑⚑ Test execution, builds, linting, validation "47 passed, 3 failed. Here's why."
hydra-scribe (Haiku 4.5) 🟒 Haiku 4.5 ⚑⚑⚑ Documentation, READMEs, comments "Documented before you finished asking."
hydra-guard (Haiku 4.5) 🟒 Haiku 4.5 ⚑⚑⚑ Security/quality gate after code changes "No secrets. No injection. You're clean."
hydra-git (Haiku 4.5) 🟒 Haiku 4.5 ⚑⚑⚑ Git: commit, branch, diff, stash, log "Committed. Conventional message. Clean diff."
hydra-coder (Sonnet 4.6) πŸ”΅ Sonnet 4.6 ⚑⚑ Code implementation, refactoring, features "Feature's done. Tests pass."
hydra-analyst (Sonnet 4.6) πŸ”΅ Sonnet 4.6 ⚑⚑ Code review, debugging, analysis "Found 2 critical bugs and an N+1 query."

Task Routing Cheat Sheet

Is it read-only? ─── Yes ──→ Finding files?
    β”‚                           β”œβ”€β”€ Yes: hydra-scout (Haiku 4.5) 🟒
    β”‚                           └── No:  hydra-analyst (Sonnet 4.6) πŸ”΅
    β”‚
    No ──→ Is it a git operation? ─── Yes ──→ hydra-git (Haiku 4.5) 🟒
    β”‚
    No ──→ Is it a security scan? ─── Yes ──→ hydra-guard (Haiku 4.5) 🟒
    β”‚
    No ──→ Just running a command? ─── Yes ──→ hydra-runner (Haiku 4.5) 🟒
    β”‚
    No ──→ Writing docs only? ─── Yes ──→ hydra-scribe (Haiku 4.5) 🟒
    β”‚
    No ──→ Clear implementation approach? ─── Yes ──→ hydra-coder (Sonnet 4.6) πŸ”΅
    β”‚
    No ──→ Needs deep reasoning? ─── Yes ──→ 🧠 Opus 4.6 (handle it yourself)

βš™οΈ Configuration

Customize Hydra's behavior with an optional config file:

# Create a default config (user-level β€” applies to all projects)
./scripts/install.sh --config

Then edit ~/.claude/skills/hydra/config/hydra.config.md:

mode: balanced          # conservative | balanced (default) | aggressive
dispatch_log: on        # on (default) | off | verbose
auto_guard: on          # on (default) | off

Project-level config (overrides user-level): Place at .claude/skills/hydra/config/hydra.config.md in your project root.

See config/hydra.config.md for the full reference with all options.


🧩 Extending Hydra

Add your own specialized head in three steps:

1. Copy the template:

cp templates/custom-agent.md agents/hydra-myspecialist.md

2. Customize the agent β€” edit the name, description, tools, and instructions.

3. Deploy it:

./scripts/install.sh --user   # or --project

Your new head is now discoverable by Claude Code alongside the built-in seven. See templates/custom-agent.md for the full template with instructions on writing effective agent descriptions, output formats, and collaboration protocols.


πŸ“‚ Repository Structure

hydra/
β”œβ”€β”€ πŸ“„ SKILL.md                          # Core framework instructions
β”œβ”€β”€ 🐲 agents/
β”‚   β”œβ”€β”€ hydra-scout.md                   # 🟒 Codebase explorer
β”‚   β”œβ”€β”€ hydra-runner.md                  # 🟒 Test & build executor
β”‚   β”œβ”€β”€ hydra-scribe.md                  # 🟒 Documentation writer
β”‚   β”œβ”€β”€ hydra-guard.md                   # 🟒 Security/quality gate
β”‚   β”œβ”€β”€ hydra-git.md                     # 🟒 Git operations
β”‚   β”œβ”€β”€ hydra-coder.md                   # πŸ”΅ Code implementer
β”‚   └── hydra-analyst.md                 # πŸ”΅ Code reviewer & debugger
β”œβ”€β”€ πŸ“š references/
β”‚   β”œβ”€β”€ routing-guide.md                 # 30+ task classification examples
β”‚   └── model-capabilities.md            # What each model excels at
β”œβ”€β”€ βš™οΈ config/
β”‚   └── hydra.config.md                  # User configuration template
β”œβ”€β”€ πŸ“‹ templates/
β”‚   └── custom-agent.md                  # Template for adding your own heads
└── πŸ”§ scripts/
    └── install.sh                       # One-command deployment

πŸ“Š Expected Impact

Metric Without Hydra With Hydra Improvement
Task Speed 1Γ— (Opus for everything) 2–3Γ— faster 🟒 Haiku 4.5 heads respond ~10Γ— faster
API Cost 1Γ— (Opus 4.6 for everything) ~0.5Γ— ~50% cheaper
Quality Opus-level Opus-level Zero degradation
User Experience Normal Normal Invisible β€” zero friction
Overhead per turn (Turn 2+) Full re-exploration each turn Session index reused 🟒 2-4s saved per turn
Scout/runner verification Opus reviews every output Auto-accepted for factual data 🟒 ~50-60% of outputs skip review

How the Savings Work

Task Type % of Work Model Used Input Cost vs Opus 4.6 Output Cost vs Opus 4.6
Exploration, search, tests, docs ~50% 🟒 Haiku 4.5 20% ($1 vs $5/MTok) 20% ($5 vs $25/MTok)
Implementation, review, debugging ~30% πŸ”΅ Sonnet 4.6 60% ($3 vs $5/MTok) 60% ($15 vs $25/MTok)
Architecture, hard problems ~20% 🧠 Opus 4.6 100% (no change) 100% (no change)
Blended effective cost ~48% of all-Opus ~48% of all-Opus

Note: Blended input = (0.5Γ—$1 + 0.3Γ—$3 + 0.2Γ—$5) / $5 = $2.40/$5 β‰ˆ 48%. Rounded to ~50% blended cost reduction overall. Savings calculated against Opus 4.6 ($5/$25 per MTok) as of February 2026.

Measure Your Savings

The most accurate way to measure Hydra's impact β€” no estimation, real numbers:

  1. Start a Claude Code session without Hydra installed
  2. Complete a representative coding task
  3. Note the session cost from Claude Code's cost display
  4. Start a new session with Hydra installed
  5. Complete a similar task
  6. Compare the two costs

That's it. Real data beats theoretical calculations every time.

What to expect (based on February 2026 API pricing)

With a typical task distribution (50% Haiku 4.5, 30% Sonnet 4.6, 20% Opus 4.6):

  • Input tokens: ~52% cheaper ($2.40 vs $5.00 per MTok)
  • Output tokens: ~52% cheaper ($12.00 vs $25.00 per MTok)
  • Blended: ~50% cost reduction
  • Speed: 2–3Γ— faster on delegated tasks

Note: Savings calculated against Opus 4.6 pricing ($5/$25 per MTok) as of February 2026. Savings would be significantly higher compared to Opus 4.1/4.0 ($15/$75 per MTok).


🎯 Design Principles

πŸ«₯ Invisibility

The user should never notice Hydra operating. No announcements, no permission requests, no process narration. If a head does the work, present the output as if Opus did it.

⚑ Speed Over Ceremony

Don't overthink classification. Quick mental check: "Haiku? Sonnet? Me?" and go. If you spend 10 seconds classifying a 5-second task, you've defeated the purpose.

πŸ”€ Parallel Heads

Independent subtasks launch in parallel. "Fix the bug AND add tests" β†’ two heads working simultaneously.

⬆️ Escalate, Never Downgrade

If a head's output isn't good enough, Opus does it directly. No retries at the same tier. This mirrors speculative decoding's rejection sampling β€” when a draft token is rejected, the target model samples directly.


πŸ”¬ The Speculative Decoding Connection

For those who want to go deeper, here's how Hydra maps to the original speculative decoding concepts:

Speculative Decoding Concept Hydra Equivalent
Target model (large) 🧠 Opus 4.6 β€” the orchestrator
Draft model (small) 🟒 Haiku / πŸ”΅ Sonnet heads
Draft K tokens Heads draft the full task output
Parallel verification Opus glances at the output
Modified rejection sampling Accept β†’ ship it. Reject β†’ Opus redoes it.
Acceptance rate (~70-90%) Target: 85%+ of delegated tasks accepted as-is
Guaranteed β‰₯1 token per loop Every task produces a result β€” Opus catches failures
Temperature/nucleus compatibility Works with any coding task type or domain

Key Papers


πŸ€” FAQ

Will I notice any quality difference?
No. Hydra only delegates tasks that are within each model's capability band. If there's any doubt, the task stays with Opus. And Opus always verifies β€” if a head's output isn't up to standard, Opus redoes it before you ever see it.
Is this actually speculative decoding?
Not at the token level β€” that happens inside Anthropic's servers and we can't modify it. Hydra applies the same philosophy at the task level: draft with a fast model, verify with the powerful model, accept or reject. Same goals (speed + cost), same guarantees (zero quality loss), different granularity.
What if I'm not using Opus?
Hydra is designed for the Opus-as-orchestrator pattern, but the principles apply at any tier. If you're running Sonnet as your main model, you could adjust the heads to use Haiku for everything delegatable.
Can I customize which models the heads use?
Absolutely. Each head is a simple Markdown file with a model: field in the frontmatter. Change model: haiku to model: sonnet (or any supported model) and you're done.
Do the heads work with subagents I already have?
Yes. Hydra heads coexist with any other subagents. Claude Code discovers all agents in the .claude/agents/ directories. No conflicts.
How do I uninstall?

Removes all agents, commands, hooks, and cache files. Deregisters hooks from ~/.claude/settings.json. Your other Claude Code configuration is preserved.

./scripts/install.sh --uninstall
# or: npx hail-hydra-cc --uninstall

🀝 Contributing

Found a task type that gets misclassified? Have an idea for a new head? Contributions are welcome!

  1. Fork it
  2. Create your branch (git checkout -b feature/hydra-new-head)
  3. Commit (git commit -m 'Add hydra-optimizer head for perf tuning')
  4. Push (git push origin feature/hydra-new-head)
  5. Open a PR

πŸ“œ License

MIT β€” Use it, fork it, deploy it. Just don't use it for world domination.

...unless it's code world domination. Then go ahead.



Hail Hydra

Built with 🧠 by Claude Opus 4.6 β€” ironically, the model this framework is designed to use less of.


Prefer a clean, technical version? See the spec-exec branch β€” same framework, zero theatrics.

Packages

 
 
 

Contributors