Skip to content

Feature: /pause and /resume slash commands #41

@Rustam-Z

Description

@Rustam-Z

Summary

Add two owner-only slash commands to the harness for temporary message muting without taking the bot down.

  • /pause — drop all inbound Telegram messages until resumed. The dispatcher continues running, the CC session stays warm, but no <msg> envelopes are forwarded to the model. Reminders / cron / self-reflection skills still fire if scheduled.
  • /resume — re-enable message forwarding. Messages received while paused are dropped, not queued.

Why

Behavior details

  • Both commands are owner-only, intercepted by the harness, never reach the LLM.
  • /pause acknowledges in the chat where it's invoked: e.g. "⏸ paused — messages dropped until /resume".
  • /resume acknowledges: e.g. "▶ resumed".
  • While paused, the harness silently drops inbound user messages from all chats (no "the bot is paused" auto-reply — that would just spam). Owner messages in the owner DM are also dropped, so the pause state is shown in /health to make it discoverable.
  • State persists across container restarts? Suggestion: no — restart implies a fresh start and operator intent is usually to resume. State lives in memory only.

Suggested implementation

  • New paused: bool flag on the dispatcher.
  • Slash-command handler flips the flag, replies, returns early.
  • Inbound message middleware checks the flag before persistence + forward; if paused, drop (don't even write to the messages table — keeps the DB clean for Encoded prompt injections (base64, Morse) crash Claude Code sessions #39's CI corpus work).
  • /health reports the flag.

Severity

Feature request, low urgency. But pairs naturally with the /kill fix (#40) and the auto-restart work (#39) — together they round out the ops surface for managing a live bot from Telegram.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions