Show HN: Hydra – Never stop coding when your AI CLI hits a rate limit

Never stop coding when your AI CLI hits a rate limit. Unified wrapper for Claude Code, Codex, OpenCode, Pi with automatic fallback and context transfer. - saadnvd1/hydra
8 points by saadn92 184 days ago github.com 2 comments
Summary not yet generated for this article.

Original Text

I built Hydra because I kept losing my flow when Claude Code hit usage limits mid-task. I would copy context, open another tool, and then re-explain everything. This would be super annoying for me.

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.

Comments (2 of ) ⌛

Loading more comments... ⌛
Scroll down to load more comments
No comments available.
Type to search HN and engineering blog articles
Press Escape to close  |  ↑↓ to navigate  |  Enter to open