siigari/claude-heartbeat — explained in plain English
Analysis updated 2026-05-18
Automate a queue of Claude Code tasks read from a simple inbox text file, without API credits.
Feed tasks into Claude Code from a cron scheduler, webhook, or Discord bot relay.
Keep a Claude Code session alive with low token usage using heartbeat ticks while idle.
Run multiple parallel Claude Code agents by setting up separate working directories.
| siigari/claude-heartbeat | imtonyjaa/ggemu-fishing-joy | mo-tunn/openguider | |
|---|---|---|---|
| Stars | 161 | 175 | 144 |
| Language | JavaScript | JavaScript | JavaScript |
| Setup difficulty | moderate | moderate | easy |
| Complexity | 3/5 | 4/5 | 2/5 |
| Audience | developer | developer | general |
Figures from each repo's GitHub metadata at analysis time.
Requires an active Claude Code subscription and configuring the stop hook plus inbox/outbox files.
claude-heartbeat is a small JavaScript tool that turns an interactive Claude Code session into an automated task processor, without needing to use Claude's command-line -p flag or the API SDK, which require separate billing credits. Instead, it works through the regular Claude Code subscription. The way it works is through a "stop hook", a script that runs automatically after each Claude response. This hook checks a file called the inbox (a simple text file where you write tasks line by line). When a new task is found, it injects that task into the Claude session, which processes it and writes its response to an outbox file. The session is then restarted fresh so the next task starts with clean context, with no leftover conversation history from previous tasks. A supervisor process sits above everything, watching for crashes or stuck sessions and restarting them automatically. While the inbox is empty, the system sends minimal "heartbeat" ticks to keep the session alive with very low token usage. The inbox and outbox files use plain text or simple JSON format, making it easy to feed tasks from a cron scheduler, an HTTP webhook, or a chat relay (a Discord bot relay is included as an optional example). Running multiple parallel agents is possible by setting up multiple working directories, each with their own supervisor and inbox. The project is aimed at developers who want to automate Claude Code tasks cheaply using an existing subscription rather than paying per-call API credits.
A tool that turns an interactive Claude Code session into an automated task queue processor using a subscription instead of billed API credits.
Mainly JavaScript. The stack also includes JavaScript, Node.js.
Setup difficulty is rated moderate, with roughly 30min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.