codex-watchdog

codex-watchdog is a skill for Claude Code, Codex from TanChuping/codex-task-watchdog. It costs 104 tokens per session (2,218 once invoked), scanned A, original, MIT.

A monitoring and troubleshooting skill for long-running Codex tasks. Codex is a coding agent that can run tools and background work.

In plain words
What is it for?
It helps check watchdog status, enable or disable monitoring, classify stalled work, clean up safely, and hand tasks back for recovery.
Why use it?
It helps identify stalled tool calls, frozen progress indicators, timeouts, and tasks whose results are finished but not shown correctly.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/tanchuping/codex-task-watchdog/codex-watchdog
Any agent
npx skills add TanChuping/codex-task-watchdog --skill codex-watchdog
Clone the repo
git clone --depth 1 https://github.com/TanChuping/codex-task-watchdog

Made for: Claude Code, Codex.

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 codex-watchdog

README.md
[![agentmods](https://agentmods.dev/badge/skills/tanchuping/codex-task-watchdog/codex-watchdog.svg)](https://agentmods.dev/skills/tanchuping/codex-task-watchdog/codex-watchdog)
Your own site
<a href="https://agentmods.dev/skills/tanchuping/codex-task-watchdog/codex-watchdog"><img src="https://agentmods.dev/badge/skills/tanchuping/codex-task-watchdog/codex-watchdog.svg" alt="Measured on agentmods" height="20"></a>
Per session 104 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,218 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00104 $0.02218
Opus 5 $0.00052 $0.01109
Sonnet 5 $0.00021 $0.00444
Haiku 4.5 $0.00010 $0.00222

Measured 3d ago against content hash f8708328972d, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

codex-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 3d ago.

The scan reads SKILL.md. This mod also ships 3 executable files (scripts/check_thread_health.py, scripts/codex_watchdog.py, scripts/test_codex_watchdog.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

skills/codex-watchdog/SKILL.md · 94 lines

How it starts

The opening of the file, as written. The whole thing — 94 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Codex Watchdog

Use scripts/codex_watchdog.py as the only state-changing interface. Resolve it from this skill's directory and invoke it by absolute path; do not rely on the current working directory.

Honor control requests

Treat these requests as executable controls, including in a brand-new conversation:

  • On “关闭watchdog” or equivalent, run python <WD_SCRIPT> disable, then report the returned state.
  • On “启用watchdog” or equivalent, run python <WD_SCRIPT> enable, then report the returned state.
  • On a watchdog status request, run python <WD_SCRIPT> status, then report the result.
  • On “卸载/彻底移除 watchdog”, run disable and then uninstall. Preserve the skill and incident files unless the user separately asks to delete them.

Do not merely acknowledge these requests. disable persists across conversations; while disabled, do not arm jobs unless the user enables monitoring again.

Monitor long work

For each tool or delegated worker expected to exceed 30 seconds:

  1. Check status once before an immediately launched batch. If enabled, classify each attempt and have the main conversation choose a rolling no-progress threshold from references/timeout-policy.md. Run arm --kind KIND --turn auto --generation 1 --timeout-seconds CHOSEN-SECONDS --label SHORT-LABEL for every initial attempt. The script uses CODEX_THREAD_ID when available and otherwise keeps an unknown-thread diagnostic label; tag UUIDs still isolate jobs. Retain the exact unique tag returned by the script.
  2. Keep parallel work isolated: assign one tag to one attempt, and pass that exact tag to every later command.
  3. Observe the real worker or output at least every 30 seconds. The main conversation or a dedicated monitoring subagent may record a heartbeat after judging the attempt healthy from current evidence such as advancing scan counters, new stream/log/tool-call records, changing output files, active process work, worker phase changes, or other task-specific progress. A timer tick or an unchanged “thinking” label alone is not proof of progress.
  4. Treat expiry of the chosen interval as a mandatory review point, not an automatic stop. Inspect the exact attempt without preempting the main task. If current evidence shows normal progress, run heartbeat TAG --note EVIDENCE and continue waiting. Absence-only evidence—including no completed command, unchanged files, no child process, post_tool_transition_unobserved, model_preparing_no_request, or a quiet model stream—never authorizes interruption. Stop only on explicit user instruction or positive terminal/failure evidence. A task may run much longer than timeout_seconds while it continues producing verified progress. Keep the separate 180-second hard limit for a single image-generation attempt when the active repository or user instructions require it.
  5. Always run disarm TAG --reason REASON immediately on completion, failure, cancellation, or a confirmed abnormal stall. Use a new generation and a new tag for any retry.

Read the full file on GitHub · 94 lines

Files

What ships with it

8 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 3d ago First seen · 94 lines · 104 tokens per session scan A f8708328972d

Subscribe to this mod's changes

codex-watchdog is a skill published in the GitHub repository TanChuping/codex-task-watchdog (2 stars, last pushed 1mo ago), licensed MIT. It adds 104 tokens to every session and 2,218 once invoked, about $0.0005 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.

Related

Other skills, from other repositories

api-endpoints

Adding or changing API operations in @repo/operations. One source of truth (defineOperation + a Zod schema) becomes an HTTP endpoint, an OpenAPI operation, an MCP tool, TS + Python SDK methods, a latitude CLI command, and an in-process agent tool — descriptions and contracts must be written with all of these readers…

latitude-dev/latitude-llm · 78 tokens

fix-datadog-issues

Find, triage, and fix production errors captured by Datadog Error Tracking, then open a PR. Use when asked to look at "Datadog issues/incidents/errors", "find and fix bugs from Datadog", investigate the most-frequent or newest production errors, or work a specific Datadog Error Tracking issue.

latitude-dev/latitude-llm · 76 tokens

web-frontend

When to use: apps/web UI — routes, @repo/ui, TanStack Start server functions and collections, navigation (Link vs useNavigate), forms (useForm with createFormSubmitHandler + fieldErrorsAsStrings when Zod validation errors should appear on fields), Tailwind layout rules, design-system updates, and useEffect /…

latitude-dev/latitude-llm · 67 tokens

database-postgres

Drizzle schema, repositories, RLS, SqlClient wiring, Postgres migrations, psql / reset, or platform mappers (toDomain / toInsertRow).

latitude-dev/latitude-llm · 39 tokens

notifications

Multi-channel notifications. Adding a new notification kind, group, or channel; in-app + email delivery; per-user prefs; project-level gates; idempotency.

latitude-dev/latitude-llm · 35 tokens

async-jobs-and-events

Queues and workers, domain event publishers, async notifications or projections, or not doing that work inside HTTP handlers.

latitude-dev/latitude-llm · 28 tokens