Coding

Nonblocking Agent Execution Enhanced

Try it

Enhanced Non-Blocking Agent Execution with AI-powered improvements. Prevents "agent stopped responding / stuck / no output" failures in sandboxed agent runtimes (Arena Agent Mode, OpenClaw, Codex) where a single long tool call blocks the turn and stdin is closed so interactive prompts hang forever. NEW in v2.0.0: - Full jobctl.sh implementation with all commands - Multi-model compatibility (OpenAI, Anthropic, Mistral, Groq, etc.) - Token usage optimization and monitoring - Hallucination reduction via verification - Self-improving through feedback loops - Comprehensive debugging and logging - Idempotent operations and graceful error handling - Watchdog timers for timeout protection - Callback URL support for async notifications - Durable state persistence across turns Provides the detach → bounded-poll → durable-state pattern plus a ready-to-use jobctl.sh runner with enhanced features for production use.

What it does

Field-authored in Arena Agent Mode (2026-07) after a real 173-skill install + llama.cpp build froze the session. Synthesizes lessons from ClawHub skills , , , , , .

The skill document

Non-Blocking Agent Execution

Field-authored in Arena Agent Mode (2026-07) after a real 173-skill install + llama.cpp build froze the session. Synthesizes lessons from ClawHub skills @aowind/long-running-harness, @wonko6x9/durable-task-runner, @skywalker-lili/polling-best-practices, @liyooyin/task-progress-stream, @nyxun123/agent-heartbeat, @hollis9087/long-task-handoff.

The three real causes of "agent not responding"

CauseSymptomFix
Blocking tool call — one bash call runs 20 minUI shows nothing, user abortsDetach the work; poll in ≤30 s bursts
Interactive prompt with closed stdinHangs forever, never times out--yes / --no-input shims + always wrap in timeout
Aborted turn kills the child processWork silently lost, half-done stateDetach with setsid, persist state to disk

Core rules

  1. No tool call over ~60 s. Long work is launched, not awaited.
  2. setsid nohup … < /dev/null & — survives the turn being cancelled; plain & does not.
  3. Bounded wait only. A poll helper that always returns within N seconds. Never wait.
  4. Every external command gets timeout N. No exceptions for network CLIs.
  5. Non-interactive flags always (--yes, --no-input, -y, DEBIAN_FRONTEND=noninteractive).
  6. State on disk, not in contextpid, exit_code, log, started_at per job, so any context reset or new turn can resume by reading files.
  7. Report progress every poll ([k/N] item) so the user sees liveness instead of silence.
  8. Idempotent resume: recompute what is missing and redo only that, never restart from zero.

The runner

./jobctl.sh start  ''   # detached, returns instantly
./jobctl.sh status               # RUNNING pid=… elapsed=…s | DONE exit=0 | DIED
./jobctl.sh wait  [max_sec=25]   # bounded — ALWAYS returns
./jobctl.sh log  [n]             # tail live output
./jobctl.sh list                       # every job's state

State lives in ~/.jobs//{cmd,pid,log,exit_code,started_at,finished_at}.

Agent loop

start job  →  status (2 s)  →  do other useful work  →  wait 25 s  →  report "[k/N]"  →  repeat  →  verify exit=0

Parallelize independent jobs in one message; only serialize true dependencies.

Resume-after-reset recipe

comm -13 <(ls installed | sort) <(sort wanted.txt) > missing.txt   # diff, don't restart
./jobctl.sh start fill 'while read x; do timeout 120 install "$x"; done < missing.txt'

Verify with a byte-exact or hash-exact assertion, never with "it looked fine".

Related skills

Join a video meeting as an AI bot with voice, avatar, and screenshare across four operating modes.

by johnpatternai21 installs8 stars

Stores durable facts in a categorized, plain-markdown vault on disk, alongside your agent's built-in memory.

by Iván555 installs18 stars

Find why your productivity system keeps failing, then apply the smallest fix — capacity math, bottleneck routing, durable local notes.

by Iván854 installs69 stars

Trade crypto, manage a multi-chain wallet, and query an AI analyst from one CLI.

by lowesyang162 installs109 stars

Query and manage Linear issues, projects, teams, cycles, labels, and comments through a managed OAuth GraphQL endpoint.

by byungkyu518 installs18 stars

Query Twitter/X profiles, tweets, follower events, and KOL data through the 6551 REST API.

by infra403840 installs27 stars

More from orionshaowswmw

Browse all skills

Detect and repair partially wiped agent workspaces with integrity checks, signed manifests, guarded restore recipes, bounded local recovery state, and explicit off-box sync. Use when files, scripts, trees, models, or build outputs disappear or lose integrity between turns.

by orionshaowswmw1 installs1 stars

Seven offline mechanisms against slow/stale/zombie/sycophantic agent turns: prompt compaction, request fencing, zombie detection, CAPTCHA triage, anti-sycophancy spine, delivery register, invention quarry. Use when chat feels laggy, reconnects surface old answers, long chats degrade, or the agent caves under contradiction. JSON contracts; state per-agent under ~/.arena_turn; no network, no sudo.

by orionshaowswmw2 installs

Quota-aware LLM router that squeezes maximum usable AI out of free-tier API keys across Gemini, Mistral, OpenRouter, Kilo and Cerebras plus any OpenAI-compatible endpoint (including local Ollama/llama.cpp/vLLM). Probes every model on every key, measures real quality and real published rate limits, then routes each request to the cheapest model that can do the job — spending abundant capacity first and reserving scarce daily quota for when it is actually needed. Persists cooldowns to disk so a 429 discovered in one process is respected by the next. Use when an agent must make many LLM calls on free keys without hitting rate limits, when "all models failed", or when deciding which of several provider keys to use for a task.

by orionshaowswmw2 installs

Opt-in, model-neutral guidance for evidence-aware, dignified AI communication, with a compact response contract and offline deterministic text audit. It never injects prompts, edits host configuration, calls networks, reads secrets, or treats heuristics as truth.

by orionshaowswmw2 installs

Iran Chemical Database — live, dated, auditable, BEST-EFFORT index of chemical offerings in configured public Iranian supplier catalogues (websites + public Telegram channels). HTTrack/WooCommerce-REST/Telegram mirroring → local-only parsing → RDKit/PubChem/CAS-validated PostgreSQL with FastAPI + Streamlit. Fail-closed Iranian-suppliers-only country gate; coverage measured and published, never claimed complete. Installation = software + queued crawl, not a populated dataset. Ships a 1399-molecule CID-unique confirmed-organic seed baseline (v2.22, 2026-08-27: v2.19 primary + live Telegram/WooCommerce/sitemap crawl + 5-model fleet normalization, every new identity PubChem-confirmed). For academic procurement research.

by orionshaowswmw3 installs

Model-agnostic, agent-agnostic fidelity-first pipeline converting operator-authorized Persian/English RTL lecture PDFs into offline HTML study guides — recall-first dual OCR (PyMuPDF + Tesseract fas+eng PSM ensemble), rendered-page evidence, multi-model correction, session-grounded enrichment (tables/flashcards/quizzes/mnemonics/summaries/scenarios), measured fidelity, QA gates, verified ZIP. v1.5.0 runs on ANY model family through 8 API dialects (OpenAI, Responses, Gemini, Anthropic, Cohere, Ollama, HuggingFace, offline mock) or with no model at all, auto-discovers providers from the host agent's environment, self-heals provider quirks and model retirements, and exposes one deterministic CLI/MCP entrypoint plus cross-model consensus so different agents reproduce the same intended result.

by orionshaowswmw2 installs