kwongfuk/codex-skills/slurm-self-healing-watchdog
- community
Checking that the SKILL.md file is still in the repository.
Submit a Slurm sbatch job through a watchdog that waits for terminal state, diagnoses failures from sacct/squeue plus stdout/stderr, invokes Codex to apply a minimal repair when needed, and resubmits up to 5 times. Use when the user wants a trigger-like loop that can monitor stopped jobs, analyze why they failed, patch the repo or sbatch script, and retry automatically.
Install
npx vskill@latest install kwongfuk/codex-skills/slurm-self-healing-watchdogSKILL.md
Slurm Self Healing Watchdog
Use this skill when a Slurm job should not stop after one failed sbatch.
What It Does
The bundled script:
- submits an
sbatchscript - polls
sacctand falls back tosqueue - resolves stdout/stderr paths from
#SBATCH -o/-e - classifies the failure mode from Slurm state plus log text
- calls
codex execwith a focused repair prompt when the job did not complete - resubmits the job after repair, up to
--max-attempts 5 - writes a JSON report for all attempts and repair summaries
When To Use
Use this skill when the user wants:
- a post-submit trigger that watches whether a Slurm job stopped
- automatic retry after timeout, OOM, node failure, launcher failure, or deterministic script bugs
- Codex to inspect logs and make a minimal fix before resubmission
- a reusable wrapper around
sbatchrather than a one-off manual loop
Do not use it when:
- the user only wants a plain one-shot submit
- the failure requires human judgment beyond safe local edits
- the repository must remain completely unchanged between retries
Workflow
- Run the watchdog from the target repository root:
- On each failed attempt, inspect the JSON report and the saved Codex repair note under the state directory.
- If the job still fails after 5 attempts, stop and review the final classified reason.
Useful Flags
--poll-seconds 30--state-dir logs/slurm/self-heal--codex-bin /home/gguo/.nvm/versions/node/v20.20.0/bin/codex--codex-model gpt-5.4--dry-runto inspect derived paths without submitting
Repair Policy
- The repair step should stay minimal and local to the repository.
- Prefer fixing the
sbatchscript, launcher, config, or the file directly implicated by the traceback. - For
TIMEOUTorOUT_OF_MEMORY, prefer resource, batch-size, checkpoint, or resume adjustments before broad code changes. - If the failure is obviously transient, Codex may make no code changes and let the watchdog resubmit unchanged.
- If Codex cannot produce a safe repair, the watchdog stops instead of looping blindly.
Output
Each run writes:
- one JSON report with attempt metadata
- one text file per repair attempt containing Codex's final summary
Read those artifacts first when deciding whether to continue manual debugging.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingworkspace/slurm-self-healing-watchdog/SKILL.md
Popularity
- 7-day trend score
- 5
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/kwongfuk/codex-skills/slurm-self-healing-watchdog)