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.
npx agentmods add commands/signalcompose/claude-tools/watch-codexgit clone --depth 1 https://github.com/signalcompose/claude-toolsWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00013 | $0.00952 |
| Opus 5 | $0.00006 | $0.00476 |
| Sonnet 5 | $0.00003 | $0.00190 |
| Haiku 4.5 | $0.00001 | $0.00095 |
Grade A, and why
watch-codex 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 3d 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.
What it actually says
Watch Codex Job
Codex companion のジョブを監視し、進捗・停滞・外部 kill を行として出力する。
なぜ必要か
codex-companion.mjs status --json の status を待機条件にしてはいけない。
ジョブが外部から kill されても "status": "running" のまま残る(dead pid の回収処理が
存在しない)ため、until status != running のループは永久に発火しない。
2026-08-27 にこれで 64 分を失った。
このコマンドは companion を呼ばず state.json を直接読み、ログの mtime と pid の生存
という2つの事実で判定する。
Usage
引数なしで、現在の workspace の実行中ジョブを監視する:
!bash ${CLAUDE_PLUGIN_ROOT}/scripts/watch-codex.sh --help
watch-codex.sh [job-id] [--stall-secs N] [--interval N] [--workspace PATH] [--state-root PATH]
job-id は codex-companion.mjs status --json の running[].id、または
state.json の jobs[].id。発注直後に監視を張るなら job-id を明示するのが確実
(省略時は「その workspace の最新 active ジョブ」を選ぶため、起動が早すぎると
まだ対象が存在しない)。
出力する行と exit code
| 行 | 意味 | exit |
|---|---|---|
MILESTONE |
コマンド完了/失敗(exit code つき) | - |
PHASE |
editing -> verifying などの遷移 |
- |
STALL |
ログが N 秒伸びていない・プロセスは生存 | 2 |
KILLED |
pid 消滅・state は running のまま | 3 |
DONE |
status=completed で正常終了 |
0 |
FAILED |
status=failed/cancelled 等で終了 |
4 |
ERROR |
監視対象を解決できない / 監視を継続できない | 1 |
成功と失敗を同じ exit 0 に畳まない。畳むと呼び出し側が終了コードで区別できず、 「running でなくなった=成功」という元の誤りに戻る。
起動時点で完了済みのマイルストーンは再生しない(件数と直近1件だけ表示)。
回し方
Monitor tool に食わせるか、run_in_background で回す。
出力行がそのまま通知したい事象になっている。
🔴 STALL が出た時の心得
「N 分応答なし」を即ハングと断定しない。 STALL と KILLED を分けているのは、
原因が違えば対処も違うため。
| 事象 | 意味 | 対処 |
|---|---|---|
KILLED |
プロセスが消滅している | ハングではない。再開する。原因調査に時間を使わない |
STALL |
プロセスは生きているがログが伸びない | 長時間コマンドかハング。まず当のコマンドを自分で回して切り分ける |
2026-08-27 の実例: 停滞していたコマンドを手元で実行したら exit 0・数秒で完了した。 つまりハングではなく外部 kill だった。切り分けを飛ばして「ハングの原因調査」に 入っていたら、さらに時間を失っていた。
詳細は ${CLAUDE_PLUGIN_ROOT}/references/codex-stall-triage.md を読む。
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.
- 3d ago First seen · 71 lines · 13 tokens per session scan A 3bdc61d1fd57
watch-codex is a command published in the GitHub repository signalcompose/claude-tools (4 stars, last pushed 6d ago), licensed MIT. It adds 13 tokens to every session and 952 once invoked, about $0.0001 per session on Opus 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-08-31.
Other commands, from other repositories
git
Git operations with intelligent commit messages and workflow optimization.
checklist
Generate a custom checklist for the current feature based on user requirements.
clarify
Identify underspecified areas in the current feature spec by asking up to 5 highly targeted clarification questions and encoding answers back into the spec.
specify
Create or update the feature specification from a natural language feature description.
analyze
Perform a non-destructive cross-artifact consistency and quality analysis across spec.md, plan.md, and tasks.md after task generation.
converge
Assess the current codebase against the feature's spec, plan, and tasks, then append any remaining unbuilt work as new tasks to tasks.md so implement can complete it.