CometixCode
Plugin / AgentAn unofficial Rust 1:1 reimplementation of the Claude Code terminal UI, ported file-for-file onto an iocraft TUI framework.
- terminal-ui
- rust
- reimplementation
- unofficial
Battle-tested watchdog scripts that keep a Claude Code + Telegram session alive on a VPS — auto-restarts, missed-message recovery and credential refresh, checked every 3 minutes.
Running claude --channels plugin:telegram@claude-plugins-official inside tmux on a VPS eventually hits every failure mode: the tmux process dies quietly, a usage-limit popup wedges the session, the Telegram Bun process disconnects, credentials expire into a 401 loop, context grows until every message burns a fistful of tokens, or a message arrives exactly during the restart. cc-tg-watchdog is a set of shell scripts (watchdog.sh health check, start.sh full restart flow, orphan-recovery.py missed-message detection) wired to a crontab entry that runs every 3 minutes: on failure it kills the old processes, replays messages nobody answered, attempts a credential refresh, starts a fresh tmux session and verifies the Telegram connection. Requirements are modest — tmux, python3, flock, timeout and ss — and the README strongly recommends a dedicated CLAUDE_CONFIG_DIR so the watchdog never touches your normal Claude Code sessions. Chinese-language docs. MIT.
Anyone running Claude Code as a 24/7 Telegram bot on a cheap VPS — the set-it-up-once-and-forget use case where nobody is watching the terminal when the quota popup lands at 4 a.m.
cp watchdog.sh ~/tgbot-watchdog.sh cp start.sh ~/tgbot.sh cp orphan-recovery.py ~/tgbot-orphan.py chmod +x ~/tgbot-watchdog.sh ~/tgbot.sh crontab -e # add: */3 * * * * /root/tgbot-watchdog.sh
The author states up front that this is a script set from one personal environment — not an official Anthropic or Telegram component, and not guaranteed loss-free. Default thresholds and process signatures can shift with Claude Code or plugin versions, so validate on a test bot before trusting it in production. It manages sessions via process inspection, so unusual launch setups may need threshold tweaks. MIT.
Repository
kittenshome/cc-tg-watchdogCharted
An unofficial Rust 1:1 reimplementation of the Claude Code terminal UI, ported file-for-file onto an iocraft TUI framework.
Hook-level enforcement for the natural-language rules in AGENTS.md and CLAUDE.md — every edit is judged and violations are repaired in the same turn.
A Claude Code plugin that replaces the lossy compaction summary with Jev-scored pruning: stale tool calls are dropped, and everything kept stays verbatim.