Getting it into your agent
This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.
/plugin marketplace add signalcompose/claude-tools/plugin install utilsWrote 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.
[](https://agentmods.dev/commands/signalcompose/claude-tools/watch-codex)<a href="https://agentmods.dev/commands/signalcompose/claude-tools/watch-codex"><img src="https://agentmods.dev/badge/commands/signalcompose/claude-tools/watch-codex/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.
<a href="https://agentmods.dev/commands/signalcompose/claude-tools/watch-codex"><img src="https://agentmods.dev/badge/commands/signalcompose/claude-tools/watch-codex.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00013 | $0.00952 |
| Opus 5.5 | $0.00005 | $0.00381 |
| Sonnet 5.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 3mo 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.
- 3mo 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 yesterday), licensed MIT. It adds 13 tokens to every session and 952 once invoked, about $0.0001 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-08-31.
watch-codex compared with commands from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| watch-codexsignalcompose/claude-tools | Command | 4 | yesterday | MIT | A | 13 | Claude Code |
| checklistgithub/spec-kit | Command | 154k | today | MIT | A | 13 | Claude Code |
| analyzegithub/spec-kit | Command | 154k | today | MIT | A | 26 | Claude Code |
| clarifygithub/spec-kit | Command | 154k | today | MIT | A | 27 | Claude Code |
| specifygithub/spec-kit | Command | 154k | today | MIT | A | 13 | Claude Code |
| convergegithub/spec-kit | Command | 154k | today | MIT | A | 35 | Claude Code |
| implementgithub/spec-kit | Command | 154k | today | MIT | A | 14 | Claude Code |