본문으로 건너뛰기
AI NEWS JOURNAL
Hacker News Show HNAI NEWS / JOURNAL

Show HN: Reinwatch – a Claude Code mod that stops runaway subagents

Article URL: https://github.com/sofumel/reinwatch Comments URL: https://news.ycombinator.com/item?id=50452047 Points: 1 # Comments: 0

번역 서비스가 일시 중지되어 원문을 표시합니다.

A token and runaway watchdog for the subagents, teammates and workflow agents Claude Code runs: per-agent tokens, warnings, notifications and history, with a way to stop one. 🇺🇸 English · 🇯🇵 日本語 Contributing · License (MIT) Claude Code's background tasks view lists tasks with elapsed time, opens their transcripts and stops them. reinwatch adds: Per-agent new-token counts (split under Details) and active time that counts model and tool work only. Warnings when an agent runs away or looks stuck, raised as notifications, plus a summary after each turn and 30-day totals. Stop, also for one agent inside a workflow, and Ask to stop. Nothing is stopped automatically. What you see Status line: agents 2 running · 310k tok · 26m active, with · 1 warning when one is open (reinwatch: 1 warning when no agent works). /reinwatch pane: one row per agent (state, name, tokens, active time, type, model, turns) with its buttons, the open warnings, the latest summary and Last 30 days: 12 agents · 1.1M tok · 3h active. Band above the prompt: the open warnings with their buttons, and after each turn 3 agents · 420k tok · 14m active combined · longest: "Explore the repo" 9m active. Warnings and settings Also notify (true), openPaneOnWarning (false) and redact (true: mask key-like text in descriptions). Set them in the plugin's options; minutes and millions may be fractional (0.5). Token counts are new tokens: input, cache writes and output. Cache reads are left out of the counts and the token warning and shown only under Details. In the terminal, warnings also reach the terminal's own notifications; in the desktop app they show only through your own Notification hook: see docs/notifications.md. /plugin install reinwatch --marketplace sofumel/reinwatch Requires Claude Code 2.1.300 or later, in the terminal or the desktop app's Code tab. Stopping and privacy Stop denies the agent's new tool calls and answers its next model call with a reply telling it to report and not resume. A running tool finishes first (the row reads stopping (a tool is still running)), Allow resume lifts the stop, and stopping one agent does not stop its workflow. No network access, shell commands or model calls. Only the 30-day store (per local day: agents, new tokens, active milliseconds) outlives the session; prompts, outputs and tool inputs are never kept, and a tool input becomes only an in-memory hash to spot repeats. redact replaces key-like text with [redacted] by its look alone: a guard against accidents, not a guarantee. Limitations Time counts only while a model or tool call is open. In the terminal, a call that waits for your approval stops counting at the prompt and is not counted after you approve (nothing marks the answer); in the desktop app the wait counts. View works only in the terminal. View and Ask to stop need the agent in Claude Code's agent list, which workflow agents are not in. After a mod reload, a row can read "running" until the agent list (checked every 10 seconds) reports it done (workflow rows: until the session ends), and work since the last summary is missing from the 30-day totals. Contributing Setup, tests and the engine's rules are in CONTRIBUTING.md. MIT. See LICENSE. Claude Code のバックグラウンドタスク画面では、タスクの一覧と経過時間の確認、記録の表示、停止ができます。reinwatch はそこに次を加えます。 エージェントごとの新規トークン数(内訳は Details)と、モデルとツールが動いていた時間だけを数える実稼働時間。 エージェントの暴走や行き詰まりを知らせる警告(通知でも届きます)、ターンごとのまとめ、30 日分の合計。 Stop(ワークフロー内の 1 体にも使えます)と Ask to stop。自動で止めることはありません。 ステータス行: agents 2 running · 310k tok · 26m active。警告があると · 1 warning が付き、動いているエージェントがいなければ reinwatch: 1 warning になります。 /reinwatch の一覧: エージェントごとの行(状態・名前・トークン・実稼働時間・種類・モデル・ターン数)とボタン、開いている警告、最新のまとめ、Last 30 days: 12 agents · 1.1M tok · 3h active。 入力欄の上の帯: 開いている警告とボタン。ターンの終わりには 3 agents · 420k tok · 14m active combined · longest: "Explore the repo" 9m active。 ほかに notify(true)、openPaneOnWarning(false)、redact(true: 説明文のキーらしい文字列を伏せる)があります。設定はプラグインのオプションで変えられ、分と百万の値には小数(0.5)も使えます。 トークン数は新規トークン(入力・キャッシュ書き込み・出力)です。キャッシュ読み込みは数にもトークン警告にも含めず、Details にだけ表示します。ターミナルでは警告がターミナル自身の通知にも届きます。デスクトップアプリでは、自分で設定した Notification フックを通したときだけ表示されます(docs/notifications.md を参照)。 /plugin install reinwatch --marketplace sofumel/reinwatch Claude Code 2.1.300 以降が必要です(ターミナル、またはデスクトップアプリの Code タブ)。 停止とプライバシー Stop は、エージェントの新しいツール呼び出しを拒否し、次のモデル呼び出しには途中経過を報告して再開しないよう伝える返答を返します。実行中のツールは最後まで動き(行は stopping (a tool is still running) と表示)、Allow resume で停止を解除できます。1 体を止めても、そのワークフローは止まりません。 ネットワーク、シェルコマンド、モデル呼び出しは使いません。セッションをまたいで残るのは 30 日分の記録(現地の日ごとの、エージェント数・新規トークン数・実稼働ミリ秒)だけです。プロンプト、出力、ツールの入力は保存せず、ツールの入力は繰り返しを見つけるためのメモリ上のハッシュにするだけです。 redact は、見た目だけを手がかりにキーらしい文字列を [redacted] に置き換えます。うっかり漏れるのを防ぐためのもので、保証ではありません。 時間は、モデルかツールの呼び出しが開いている間だけ数えます。ターミナルでは、許可を待つ呼び出しは確認が出た時点で数えるのを止め、許可した後も数えません(答えた瞬間を示すものがないため)。デスクトップアプリでは待ち時間も数えます。 View はターミナルでだけ使えます。View と Ask to stop は、エージェントが Claude Code のエージェント一覧に載っている必要があり、ワークフローのエージェントは載りません。 mod を読み直したあと、行が「running」のままになることがあります。エージェント一覧(10 秒ごとに確認)が終了を伝えるまで続き、ワークフローの行はセッションが終わるまで続きます。直前のまとめ以降の作業は 30 日分の合計に入りません。 環境の準備、テスト、エンジンの決まりは CONTRIBUTING.md にあります(英語)。 MIT。LICENSE を参照してください。

자료 출처

원문 읽기 ↗

관련 주제

← 전체 소식 이어 읽기