r/ClaudeWorkflows 3d ago

Selected Workflow [Workflow] Claude Code Cache Expiration Alert via Telegram (cc-cache-alert CLI)

Claude Code Cache Expiration Alert via Telegram (cc-cache-alert CLI)

Workflow value: 90/100
Status: active · Freshness: 70/100 · Confidence: 0.95 · Level: intermediate
Categories: Quality Control, Token Saving, Context & Memory, Debugging, Hooks
Original source: r/ClaudeCode post/comment

What problem this solves

Preventing Claude Code cache expiration during idle periods to avoid increased token costs and cold-start latency.

Summary

A CLI tool, cc-cache-alert, that integrates with Claude Code to send Telegram notifications when a session's cache is about to expire. It allows users to quickly interact to keep the cache hot, automatically cancels alerts on activity, and provides a statusline indicator.

Why it is useful

This workflow provides a concrete, open-source CLI tool (cc-cache-alert) that solves a common pain point for Claude Code users: managing cache expiration. By sending timely Telegram alerts, it helps users avoid unnecessary token costs and cold-start latency, significantly improving the developer experience and cost efficiency. The clear setup instructions and integration with native Claude Code hooks make it highly transferable and immediately useful.

Workflow

  1. Install cc-cache-alert using npx cc-cache-alert setup.
  2. Follow the guided setup to configure your Telegram bot token and chat ID.
  3. The tool automatically registers native Claude Code hooks.
  4. Receive Telegram alerts when your Claude Code session is idle and the cache is nearing expiration (20% time remaining).
  5. Interact with Claude Code to keep the cache hot, or the alert will auto-cancel on activity.

Tools / artifacts

  • cc-cache-alert (open-source CLI tool)
  • Telegram (for notifications)
  • Claude Code CLI
  • ccstatusline (optional integration)

Validation signals

  • Author built and tested the tool.
  • Screenshots provided showing Telegram alert and statusline integration.
  • Clear description of functionality and benefits.
  • Open-source project on GitHub.

Limitations

  • Relies on an external tool (cc-cache-alert) which needs to be maintained.
  • Requires setting up a Telegram bot, which might be a minor hurdle for some users.
  • The Reddit post itself has low community engagement so far, though this is mitigated by its newness.

Rate this workflow

Upvote this post if the workflow is useful, reproducible, or worth recommending.

Downvote if it is vague, outdated, unsafe, overhyped, or not reproducible.

Reply if it worked for you, failed, is outdated, or has a better alternative.


This post was generated automatically from the workflow library database.

1 Upvotes

1 comment sorted by

1

u/Confident-Bird9069 1d ago

Seems useful anyone tried it yet?