watchdog

watchdog is a command for Claude Code from JannLeo/telinksdk-builder-mcp. It costs 39 tokens per session (403 once invoked), scanned A, original, MIT.

A command for viewing and controlling background Trae CLI sessions. Trae CLI is a command-line coding session tool; the command can report session status, compress a session's context, restart it, or send it a continuation message.

In plain words
What is it for?
Use it to list active sessions, restart a failed or stalled session, or send a session a request to continue. It can use a full session ID or its first eight characters.
Why use it?
It avoids manually reading session files or building the underlying commands. It also provides a consistent response when a session is working, waiting, or has failed.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter.

Part of the telinksdk-builder plugin — 7 commands shipped together

Good fit Use it to list active sessions, restart a failed or stalled session, or send a session a request to continue. It can use a full session ID or its first eight characters.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/jannleo/telinksdk-builder-mcp/watchdog
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/JannLeo/telinksdk-builder-mcp

Made for: Claude Code.

Or install telinksdk-builder, the plugin that ships this one along with the rest of its 7 commands.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for watchdog

README.md
[![agentmods](https://agentmods.dev/badge/commands/jannleo/telinksdk-builder-mcp/watchdog/github.svg)](https://agentmods.dev/commands/jannleo/telinksdk-builder-mcp/watchdog)
Your own site
<a href="https://agentmods.dev/commands/jannleo/telinksdk-builder-mcp/watchdog"><img src="https://agentmods.dev/badge/commands/jannleo/telinksdk-builder-mcp/watchdog/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for watchdog

Your own site · 80×15
<a href="https://agentmods.dev/commands/jannleo/telinksdk-builder-mcp/watchdog"><img src="https://agentmods.dev/badge/commands/jannleo/telinksdk-builder-mcp/watchdog.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 39 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 403 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00039 $0.00403
Opus 5.5 $0.00016 $0.00161
Sonnet 5.5 $0.00008 $0.00081
Haiku 4.5 $0.00004 $0.00040

Measured 1mo ago against content hash a151dae145e2, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

watchdog scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

commands/watchdog.md · 18 lines

What it actually says

管理 Trae CLI 后台会话(数据来自本机 trae-cli 的 sessions 目录)。调用 ${COCO_PLUGIN_ROOT}/scripts/watchdog_cli.py,不要自己拼命令或直接读 events.jsonl。

根据用户参数 $ARGUMENTS 选择子命令,构造命令:python ${COCO_PLUGIN_ROOT}/scripts/watchdog_cli.py <子命令> [参数],用 Bash 工具执行后解析 stdout 的 JSON 向用户汇报。

  • 无参数 或 status:列出最近 24h 活跃会话及其状态。汇报每个会话的 short_id、标题、状态(working 工作中 / idle_waiting 空闲等输入 / error 报错 / unknown),error 状态要特别标出并建议 /watchdog restart <id>。
  • restart <会话ID>:压缩上下文并发送"继续之前的任务"指令(会话 ID 可用完整 ID 或前 8 位)。汇报 compact_ok / resume_ok。
  • continue <会话ID> [提示词]:只发送继续指令(默认"继续之前的任务",可自定义提示词)。汇报 ok 与 session_id。

注意:

  • 会话 ID 为空时脚本默认取最活跃的会话。
  • 若输出含 "未找到 trae-cli",提示用户设置 TRAE_CLI 环境变量或在 PATH 中安装。
  • 所有操作只影响 trae-cli 后台会话,与本插件构建功能无关。
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 18 lines · 0 tokens per session scan A a151dae145e2

Subscribe to this mod's changes

watchdog is a command published in the GitHub repository JannLeo/telinksdk-builder-mcp (1 stars, last pushed 1mo ago), licensed MIT. It adds 39 tokens to every session and 403 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-15.