pueue-job-orchestration
Manage long-running jobs and batch processing with pueue queue orchestration, CLI telemetry, and companion monitoring tools (noti, ntfy, mprocs,
What this skill does
# Pueue Job Orchestration > Universal CLI telemetry layer and job management — every command routed through pueue gets precise timing, exit code capture, full stdout/stderr logs, environment snapshots, and callback-on-completion. > **Self-Evolving Skill**: This skill improves through use. If instructions are wrong, parameters drifted, or a workaround was needed — fix this file immediately, don't defer. Only update for real, reproducible issues. ## Overview [Pueue](https://github.com/Nukesor/pueue) is a Rust CLI tool for managing shell command queues. It provides: - **Daemon persistence** - Survives SSH disconnects, crashes, reboots - **Disk-backed queue** - Auto-resumes after any failure - **Group-based parallelism** - Control concurrent jobs per group - **Easy failure recovery** - Restart failed jobs with one command - **Full telemetry** - Timing, exit codes, stdout/stderr logs, env snapshots per task ## When to Route Through Pueue | Operation | Route Through Pueue? | Why | | ------------------------------------- | -------------------- | -------------------------------------- | | Any command >30 seconds | **Always** | Telemetry, persistence, log capture | | Batch operations (>3 items) | **Always** | Parallelism control, failure isolation | | Build/test pipelines | **Recommended** | `--after` DAGs, group monitoring | | Data processing | **Always** | Checkpoint resume, state management | | Quick one-off commands (<5s) | Optional | Overhead is ~100ms, but you get logs | | Interactive commands (editors, REPLs) | **Never** | Pueue can't handle stdin interaction | ## When to Use This Skill Use this skill when the user mentions: | Trigger | Example | | ---------------------------- | ------------------------------------------ | | Running tasks on BigBlack | "Run this on bigblack" | | Long-running data processing | "Populate the cache for all symbols" | | Batch/parallel operations | "Process these 70 jobs" | | SSH remote execution | "Execute this overnight on the GPU server" | | Cache population | "Fill the ClickHouse cache" | | Pueue features | "Set up a callback", "delay this job" | ## Quick Reference ### Check Status ```bash # Local pueue status # Remote (BigBlack) ssh bigblack "~/.local/bin/pueue status" ``` ### Queue a Job ```bash # Local (with working directory) pueue add -w ~/project -- python long_running_script.py # Local (simple) pueue add -- python long_running_script.py # Remote (BigBlack) ssh bigblack "~/.local/bin/pueue add -w ~/project -- uv run python script.py" # With group (for parallelism control) pueue add --group p1 --label "BTCUSDT@1000" -w ~/project -- python populate.py --symbol BTCUSDT ``` ### Monitor Jobs ```bash pueue follow <id> # Watch job output in real-time pueue log <id> # View completed job output pueue log <id> --full # Full output (not truncated) ``` ### Manage Jobs ```bash pueue restart <id> # ⚠ Creates NEW task (see warning below) pueue restart --in-place <id> # Restarts task in-place (no new ID) pueue restart --all-failed # ⚠ Restarts ALL failed across ALL groups pueue kill <id> # Kill running job pueue clean # Remove completed jobs from list pueue reset # Clear all jobs (use with caution) ``` **CRITICAL WARNING — `pueue restart` semantics**: `pueue restart <id>` does **NOT** restart the task in-place. It creates a **brand new task** with a new ID, copying the command from the original. The original stays as Done/Failed. This causes exponential task growth when used in loops or by autonomous agents. In a 2026-03-04 incident, agents calling `pueue restart` on failed tasks grew 60 jobs to ~12,800. - **Use `--in-place`** if you truly need to restart: `pueue restart --in-place <id>` - **Verify before restart**: Read `pueue log <id>` to check if the failure is persistent (missing data, bad args) — retrying will never help - **Never use `--all-failed`** without `--group` filter — it restarts every failed task across ALL groups ## Host Configuration | Host | Location | GPU | Parallelism Groups | | ------------- | ------------------------- | ----------- | ------------------------------- | | BigBlack | `~/.local/bin/pueue` | RTX 4090 | p1 (16), p2 (2), p3 (3), p4 (1) | | LittleBlack | `~/.local/bin/pueue` | RTX 2080 Ti | p1 (8), p2 (2) | | Local (macOS) | `/opt/homebrew/bin/pueue` | N/A | default | ## Core Workflows ### 1. Queue Single Remote Job ```bash # Step 1: Verify daemon is running ssh bigblack "~/.local/bin/pueue status" # Step 2: Queue the job ssh bigblack "~/.local/bin/pueue add --label 'my-job' -- cd ~/project && uv run python script.py" # Step 3: Monitor progress ssh bigblack "~/.local/bin/pueue follow <id>" ``` ### 2. Batch Job Submission (Multiple Symbols) For rangebar cache population or similar batch operations: ```bash # Use the pueue-populate.sh script ssh bigblack "cd ~/rangebar-py && ./scripts/pueue-populate.sh setup" # One-time ssh bigblack "cd ~/rangebar-py && ./scripts/pueue-populate.sh phase1" # Queue Phase 1 ssh bigblack "cd ~/rangebar-py && ./scripts/pueue-populate.sh status" # Check progress ``` ### 3. Configure Parallelism Groups ```bash # Create groups with different parallelism limits pueue group add fast # Create 'fast' group pueue parallel 4 --group fast # Allow 4 parallel jobs pueue group add slow pueue parallel 1 --group slow # Sequential execution # Queue jobs to specific groups pueue add --group fast -- echo "fast job" pueue add --group slow -- echo "slow job" ``` ### 4. Handle Failed Jobs ```bash # Check what failed pueue status | grep Failed # View error output FIRST (distinguish transient vs persistent) pueue log <id> # Restart specific job IN-PLACE (no new task created) pueue restart --in-place <id> # ⚠ NEVER blindly restart all failed — classify failures first # pueue restart --all-failed # DANGEROUS: no group filter, creates duplicates ``` **Failure classification before restart**: Exit code 1 (app error) may be persistent (missing data, bad args — will never succeed). Exit code 137 (OOM) or 143 (SIGTERM) may be transient. Always read `pueue log` before restarting. ## Troubleshooting | Issue | Cause | Solution | | -------------------------- | ------------------------ | --------------------------------------------------- | | `pueue: command not found` | Not in PATH | Use full path: `~/.local/bin/pueue` | | `Connection refused` | Daemon not running | Start with `pueued -d` | | Jobs stuck in Queued | Group paused or at limit | Check `pueue status`, `pueue start` | | SSH disconnect kills jobs | Not using Pueue | Queue via Pueue instead of direct SSH | | Job fails immediately | Wrong working directory | Use `pueue add -w /path` or `cd /path && pueue add` | ## Priority Scheduling (`--priority`) Higher priority number = runs first when a queue slot opens: ```bash # Urgent validation (runs before queued lower-priority jobs) pueue add --priority 10 -- python validate_critical.py # Normal compute (default priority is 0) pueue add -- python train_model.py # Low-priority background task pueue add --priority -5 -- python cleanup_logs.py ``` Priority only affects **queued** jobs waiting for an open slot. Running jobs are not preempted. ## Per-Task Environment Override (`pueue env`) I
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.