Introduction¶
When running agents with DeepSeek Harness (DSH), events such as task completion, agent questions, tool approval requests, and long-term goal status changes can occur asynchronously. If a person is not present at the terminal, it is easy to miss nodes requiring manual input.
Below is introduced emiliagarfield6-bot/dsh-telegram-notify. It is a Telegram notification plugin for DSH, used to send reminders to Telegram when events occur.
What is it¶
dsh-telegram-notify is maintained by emiliagarfield6-bot and is licensed under MIT.
Its positioning is: to forward key events during DSH agent execution as Telegram messages, including:
- Task completion
- Agent questions
- Request tool approval
- Long-term goal completion or blocked
Core Features¶
Below are the verified functional points.
Trigger Timing¶
The plugin sends Telegram notifications when the following events occur:
- The agent returns from running to idle, i.e., task completion.
- The agent calls
ask_user_question, requiring user input. - The agent requests tool approval.
- Long-term goal completion or blocked.
Notification Noise Reduction¶
To avoid unnecessary interruptions, the plugin has two types of restrictions:
- Only the root session triggers notifications; child agent endings do not trigger notifications.
- No notification if the run duration is less than
minRunSeconds; there is a debounce after returning to idle.
Notification Modes¶
The plugin supports concise mode and complex mode.
- Concise mode: Only notifies task results.
- Complex mode: In addition to the result, includes task duration, token consumption, and cache hit rate.
sendTaskContent: Default is off. When enabled, in complex mode, it can include the final output content of this round.
Installation and Enablement¶
First, obtain the plugin source code. The installation command below is provided by verified information.
Execute in the plugin source code directory:
dsh plugin --profile web add .
Execute from any directory; you need to provide the package path:
dsh plugin --profile web add file:/absolute/path/dsh-telegram-notify
The file: dependency is packaged and copied during installation. After modifying source code, you need to re-run dsh plugin add for changes to take effect.
If you want to modify and use directly in the source code directory, you can use the symbolic link method:
dsh plugin --profile web add link:<path>
Uninstall can be executed:
dsh plugin --profile web remove dsh-telegram-notify
Configuration¶
There are two entry points for configuration: the DSH Settings page, or the profile’s cordis.patch.yml.
Getting Telegram Configuration¶
- Find
@BotFatherin Telegram to create a bot and obtain the token. - Send a message to the bot to get the chat ID via
@userinfobot. - You can also get the chat ID by accessing the following interface:
https://api.telegram.org/bot<token>/getUpdates
Configuring in Settings Page¶
Navigate to:
Settings > Plugins > Plugin Config > telegram-notify
Fill in token and chatId. For domestic networks, you can fill in proxy together, or use apiBase as a reverse proxy address.
You can also configure:
sendTaskContentminRunSeconds- Notification modes
- Various notification toggles
The token field is declared as secret. The settings page only writes and does not read, so it will not be returned in plaintext.
Configuring in Profile¶
You can also configure in the profile’s cordis.patch.yml:
- id: telegram-notify
config:
token: "123456:ABC..."
chatId: "123456789"
proxy: "http://127.0.0.1:7890"
Note: DSH’s patch config performs a full replacement, not a deep merge. When overwriting configuration, you must include all fields to be set; fields not listed will use the plugin’s default values.
Configuration Priority¶
Configuration priority from high to low is:
- The
telegram-notifynamespace in the settings page - The
configin profilecordis.patch.yml - Environment variables
TELEGRAM_BOT_TOKEN/TELEGRAM_CHAT_ID - Schema default values
Restart After First Configuration¶
After the first configuration, close DSH and restart:
dsh web
After successful startup, you will receive a reminder “DSH Telegram Notification Online”. If no notification is sent, check the failure records in the DSH logs.
Typical Usage¶
After the above steps, the common usage is as follows.
-
Receive notification when task completes.
Applicable to scenarios where the agent returns from running to idle. -
Receive notification when agent asks question.
Applicable to scenarios where the agent callsask_user_questionand waits for an answer. -
Receive notification when requesting tool approval.
Applicable to scenarios where the agent requests tool approval and waits for manual processing. -
Receive notification when long-term goal status changes.
Includes long-term goal completion or blocked. -
When more information is needed, use complex mode.
Complex mode includes task duration, token consumption, and cache hit rate. -
When you need to view the final output of this round, turn on
sendTaskContent.
This configuration is disabled by default and only takes effect in complex mode.
Suitable Scenarios and Notes¶
Who is it suitable for¶
This plugin is suitable for the following situations:
- DSH tasks run for a long time, and it is inconvenient for people to stay by the terminal.
- Hope to receive reminders immediately when agent asks questions, requests approval, or long-term goal status changes.
- Using the Telegram API in a domestic network environment, requiring configuration of
proxyorapiBase. - Hope that notification failure does not affect the agent’s main process.
Notes¶
- The plugin runs with the current dsh process permissions; you should check the source code and license before installation.
- Notification is fire-and-forget; failure only logs, and does not affect the agent’s main process.
- Under a domestic network,
api.telegram.orgcannot be connected directly; you need to setproxyor useapiBaseas a reverse proxy address. file:installation involves packaging and copying at installation time; modifying source code requires re-runningaddto take effect.- Runtime environment requirements:
Node.js ^22.19.0 || >=24.0.0
@deepseek-ai/schemastery >=3.18.0
Conclusion¶
If your DSH tasks often need to leave the terminal, dsh-telegram-notify provides a minimal closed loop: sending task completion, questions, approvals, and long-term goal status to Telegram.
Related Links:
- GitHub:
https://github.com/emiliagarfield6-bot/dsh-telegram-notify - Community directory: Can be searched for
dsh-telegram-notifyin the independent community directory.