Hydra wraps your AI coding CLIs (Claude Code, Codex, OpenCode, Pi, or any terminal-based tool) in a single command. It monitors terminal output for rate limit patterns, and when one provider runs out, you switch to another with one keypress. Your conversation history, git diff, and recent commits are automatically copied to your clipboard so you can paste and keep going.
The fallback chain is configurable. Mine goes Claude Code → OpenCode (free Gemini) → Codex → Pi (free Gemini). The free tiers alone give you ~3000 requests/day, so even after burning through paid limits you can keep working.
Key details: Full PTY passthrough you see the exact same TUI as running the CLI directly hydra switch from another terminal signals ALL running sessions (rate limits are account-wide) Context extraction parses Claude Code's JSONL session files for real conversation history, not just recent output Any CLI that runs in a terminal works as a provider Single Go binary, ~200 lines of core logic
https://github.com/saadnvd1/hydra
Nothing amazing, but wanted to share with others in case it's useful. Feel free to modify it as you see fit.