Skip to content

adagues/openclaw-telegram-task-silencer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

openclaw-telegram-task-silencer

A tiny OpenClaw plugin that suppresses the Background task done: … notifications on the Telegram channel only.

Why

When you spawn ACP or subagent background tasks bound to a Telegram thread (e.g. via openclaw acp spawn, thread bindings, or the built-in task registry), OpenClaw auto-delivers a terminal notification to the thread when each task finishes:

Background task done: kiro-identity-test4 (run 3970).
Background task blocked: …
Background task failed: …
…

These are noisy when you use ACP sessions heavily from Telegram. This plugin drops those specific outbound messages on the Telegram channel and only those.

What it does (and doesn’t do)

  • ✅ Intercepts the Telegram outbound via the message_sending hook and returns { cancel: true } for messages whose content starts with a known task-terminal prefix.
  • ✅ Leaves every other Telegram message untouched (pass-through).
  • ✅ Leaves the task registry untouched: tasks still run, still reach their terminal state, still update deliveryStatus, still dispatch in-session mirrors, still power openclaw tasks list. Only the Telegram notification line is swallowed.
  • ❌ Does not modify ACPx, the task registry bundle, or any OpenClaw internals. No monkey-patching, no policy flipping, no cron.

Supported prefixes

The plugin drops outbound Telegram messages that start with any of:

  • Background task done:
  • Background task blocked:
  • Background task failed:
  • Background task timed out:
  • Background task cancelled:
  • Background task lost:
  • Task needs follow-up:

These are the exact strings emitted by OpenClaw’s formatTaskTerminalMessage / formatTaskBlockedFollowupMessage (dist/task-registry-*.js).

Install

From a local clone

git clone https://github.com/adagues/openclaw-telegram-task-silencer.git
openclaw plugins install ./openclaw-telegram-task-silencer
# restart the OpenClaw gateway for plugins to load

Uninstall

openclaw plugins uninstall telegram-task-silencer

How it works

OpenClaw exposes a message_sending hook (see dist/extensions/telegram/delivery-*.js) that runs right before each outbound Telegram message is delivered. The plugin registers a single handler:

api.on("message_sending", async (event, ctx) => {
  if (!isTelegramChannel(event, ctx)) return;           // wrong channel → pass-through
  if (!isTaskTerminalMessage(event?.content)) return;   // not a task notif → pass-through
  return { cancel: true };                              // drop this message only
});

That’s the whole plugin.

Compatibility

  • Tested against OpenClaw 2026.4.29 / CLI 2026.4.22.
  • Relies on the public plugin SDK (openclaw/plugin-sdk/plugin-entry) and the message_sending hook, both documented surfaces.
  • If OpenClaw ever changes the terminal message wording, the prefix list in index.js needs an update.

License

MIT — see LICENSE.

About

OpenClaw plugin that silences 'Background task done/...' notifications on Telegram only, without touching the task registry.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors