skills/wait-for-job/SKILL.md
Wait for long-running external tasks from waiting or queued state through running to validated completion before continuing work. Use when Codex must block on cluster jobs, batch pipelines, CI runs, or other asynchronous operations by polling status every N seconds (default 120), checking the best available logs/outputs/results while the work is active, and proceeding only after completion is confirmed, with a hard timeout cap of 8 hours.
npx skillsauth add olliecrow/codex wait-for-jobInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
status-poller owns the primary command, regex, timeout state, and wait progress, and updates plan/current/wait-for-job.md.artifact-checker owns secondary logs, outputs, and contradictory failure signals, and updates the same note with evidence.rg -> find/grep, python -> python3, alternate repo-native scripts).plan/, ensure required plan directories exist before reading/writing them (create when edits are allowed; otherwise use an in-memory fallback and call it out).investigate -> plan -> fix -> verify -> battletest -> organise-docs -> git-commit -> re-review; cleanup scan -> prioritize -> clean -> verify -> re-scan; docs audit -> update -> verify -> re-audit.organise-docs frequently during execution to capture durable decisions and learnings, not only at the end.git-commit when changes are commit-eligible, checks are green, and repo policy permits commits.docs/ accurate and up to date, and promote durable learnings and decisions from work into docs.git-commit to create a small logical checkpoint commit once relevant checks are green and repo policy permits commits.organise-docs whenever durable learnings/decisions appear, and prune stale plan/ scratch artifacts.The skill is complete only when all of the following are true:
blocked with concrete blocker evidence.done, blocked, or not-applicable, with brief evidence or rationale.Stop only after this terminal contract is satisfied; otherwise continue iterating.
done: poller reaches terminal success condition (exit-code or completion regex), waiting or queued states were watched through to finish, and the best available logs/outputs/results do not contradict successful completion.blocked: timeout cap, explicit failure regex, or repeated command failure occurs after bounded retries; failure evidence and retry/unblock command are reported.not-applicable: downstream action is intentionally skipped when user requested wait-only behavior (for example status reported with no follow-on execution).Block until an external task is fully complete, then continue with downstream analysis or execution. Treat waiting, queued, and running states as active monitoring time, not as a reason to stop early. Use the bundled poller to avoid racing ahead while jobs are still active, and check the best available logs, outputs, and results before calling the task done.
0 only when the task is complete.Failed, Error, Cancelled) for hard-stop conditions.--interval-seconds at 120 unless the user asks for different polling cadence.--timeout-seconds with an upper bound of 28800 (8 hours). The script enforces this cap and defaults to 28800.0 or matching success regex: proceed only if logs/outputs/results do not show contradictory failure or broken output.CLUSTER_ENV_FILE=\"$PWD/.env\")..env is missing, attempt high-confidence reconstruction from project conventions first; if confidence is low, fail fast and ask.PENDING and RUNNING until all scoped jobs reach terminal state and the best-available outputs/logs/results look sane.Use when status command can return 0 only once complete.
python "/path/to/wait-for-job/scripts/poll_until_done.py" \
--check-cmd "test -f /tmp/job.done" \
--interval-seconds 120
Use when status command always exits 0 but output changes over time.
python "/path/to/wait-for-job/scripts/poll_until_done.py" \
--check-cmd "kubectl get job my-job -n my-namespace -o jsonpath='{.status.conditions[*].type}'" \
--success-regex "Complete" \
--failure-regex "Failed" \
--interval-seconds 120
Use scripts/poll_until_done.py.
Arguments:
--check-cmd: shell command to evaluate each poll.--success-regex: optional regex that marks completion from command output.--failure-regex: optional repeatable regex for terminal failure output.--interval-seconds: polling interval (default 120).--timeout-seconds: wall-clock timeout in seconds, required range 1..28800 (default 28800).--max-attempts: max polling attempts (0 disables cap).--retry-on-nonzero: in regex mode, continue polling when command exits non-zero.--quiet: print only terminal outcome messages.Exit codes:
0: task completed.1: timeout or max attempts reached.2: failure condition detected or fatal command error.130: interrupted.data-ai
Use automatically for Sentinel repo sessions, trading research questions, market/company/ticker/source questions, or any request that should use Sentinel's read-only data sources and reference context. Enforces Sentinel's high-confidence, read-only, no-local-query-trace research posture.
documentation
Compact the current conversation into a handoff document for another agent to pick up.
tools
Run the Codex custom review feature from the CLI for arbitrary review instructions. Use when the user asks to use /review, custom review, or Codex review without tying the review to commits, uncommitted changes, or a base branch; prefer multicodex exec review with no explicit account and fall back to codex exec review only when multicodex is unavailable.
tools
Use only when the user explicitly asks to stage, commit, push, and open a GitHub pull request in one flow using the GitHub CLI (`gh`).