Long Task Runner for Openclaw

Long Task Runner executes slow local commands and queued workloads with controlled waiting, safe recovery, bounded logs, and evidence-based completion checks.

dhzyw
v1.1.0
Sep 12, 2026
0
220
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install long-task-runner

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install long-task-runner using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Long Task Runner?

Long Task Runner is an Openclaw Skills utility for managing time-consuming local processes such as rendering, text-to-speech, batch processing, builds, and approved remote-job submissions. It uses existing production scripts rather than creating a new executor for every scenario, with Python 3.10+ and a standard-library-only runtime.

The skill provides a disciplined lifecycle for job specification, startup, waiting, status inspection, cancellation, safe resume, and final artifact validation. It is designed for Windows and PowerShell by default, while preserving user authorization boundaries and avoiding unauthorized retries, external actions, message sending, or hidden model polling.

Long Task Runner Use Cases

  • Run slow rendering, TTS, media-generation, and data-processing commands without flooding the conversation with logs.
  • Queue local builds, batch jobs, and other long-running workflows with explicit timeouts and completion criteria.
  • Inspect concise progress snapshots when a user asks for an update.
  • Cancel a local process tree when a job must be stopped.
  • Resume only local or read-only work that is explicitly safe to replay.
  • Validate visual, audio, data, or business outputs before delivering a supposedly successful result.
  • Hand off a completed runner-assisted task to a fresh conversation when the user begins independent work.
  • Preserve proven procedures and concise project context for reuse in future Openclaw Skills workflows.

How Long Task Runner Works

  1. Read only the required inputs and current state, then determine the command, working directory, resource locks, reasonable timeout, and completion criteria.
  2. Create a job.json specification using the documented job schema and consult the relevant scenario requirements so domain-specific quality checks are retained.
  3. Start the job with scripts/runner.py start, assigning an independent job directory. Repeating the same configuration returns its current state; a different configuration is rejected.
  4. Serialize shared resources, such as a GPU, through a common resource_dir and resource key. Each job uses a concurrency limit of one by default.
  5. Wait only through the available host tooling and bounded waits. The wait command returns a snapshot after local waiting and is not a notification-registration mechanism.
  6. Report progress with one status --job call, optionally using --since to return only new task-merged changes rather than rereading the full log.
  7. Diagnose failures from the relevant state record and, only when needed, retrieve a bounded log tail with logs --bytes 4096.
  8. Cancel local process trees with cancel, or use resume --replay-safe only for declared-safe unfinished local or read-only steps. Do not automatically retry external submissions or paid operations.
  9. Treat succeeded as a preliminary runner result: verify the actual output surface, including visual, audio, data, or business quality, before delivery.
  10. After delivery, retain a concise evidence-based handoff containing successful methods, script locations, and applicable boundaries; offer a fresh chat or reusable skill only when the next request is independent and the user agrees.

Long Task Runner Setup

Requirements

  • Python 3.10 or newer.
  • Runtime dependencies are limited to the Python standard library.
  • Windows and PowerShell are the default host environment.
  • Use the existing runner scripts and keep each job in an independent working directory.

Quick demonstration

Set $skillDir to the directory containing this skill, then run the following commands from PowerShell:

python "$skillDir/scripts/make_demo.py" --directory ./work/runner-demo --seconds 3
python "$skillDir/scripts/runner.py" start --spec ./work/runner-demo/demo.json --job ./work/runner-demo/job
python "$skillDir/scripts/runner.py" wait --job ./work/runner-demo/job --seconds 25

Operational setup

  1. Create a job.json file that defines the approved command, working directory, timeout, resource requirements, and completion checks.
  2. Start production work with an absolute specification path:
python scripts/runner.py start --spec /absolute/path/to/job.json --job /absolute/path/to/job-directory
  1. Use status, logs, cancel, and resume --replay-safe only according to the job state and replay policy.
  2. Review references/job-spec.md, references/scenarios.md, and, for first-time host waiting, references/host-waiting.md before operating unfamiliar workflows.
  3. Enable optional log compression only when required and when the environment already provides the relevant RTK or Context Mode support; do not install global hooks automatically.

The runner does not authorize external operations, create new automations, change model or task configuration, send messages, or call an additional decision LLM. Commands still require review before execution.

Long Task Runner Data Schema & Taxonomy

Job specification

Element Purpose
job.json Declares the command, inputs, working directory, timeout, resource lock, and completion criteria.
resource_dir Shared directory used to coordinate exclusive resources such as GPUs.
Resource key Serializes jobs that require the same shared resource.
Replay policy Identifies local or read-only steps that may be safely replayed.
External-task boundary Prevents automatic retry or resume for remote submissions and paid calls.

Job directory artifacts

  • state.json: Authoritative state and failure records used for targeted diagnosis.
  • Event and progress data: Short, task-merged updates used by status --since <revision>.
  • Rotating or bounded logs: Runtime output inspected through logs --bytes 4096 when evidence is needed.
  • Produced artifacts: The files or outputs generated by the command and subsequently checked against domain-specific quality criteria.
  • Handoff notes: A concise record of proven methods, script locations, successful checks, and scope limitations for future work.

State and validation taxonomy

  • running: The process is active or awaiting a bounded host wait.
  • succeeded: Exit code and configured runner checks passed; final product validation is still required.
  • failed: Inspect the associated failure code and state record before attempting repair.
  • cancelled: The local process tree was explicitly terminated.
  • replay-safe: Only declared-safe unfinished local or read-only steps qualify for resume.
  • external: Remote submissions, paid calls, and other side-effecting work are not automatically retried or resumed.

A file's existence, a progress bar, or a heartbeat is never sufficient evidence of success. Openclaw Skills workflows should preserve the actual output checks appropriate to the task.

Long Task Runner Advanced Features

  • Bounded log retrieval and concise event merging reduce context growth during long jobs.
  • Incremental status queries with --since <revision> expose only new progress information.
  • Resource locking through shared directories and keys supports safe serialization of GPU and other exclusive workloads.
  • Process-tree cancellation stops local work without pretending to take over an old process ID during resume.
  • Replay-aware recovery skips already verified successful steps and limits resume to explicitly safe local or read-only operations.
  • Evidence-based completion combines exit codes, configured checks, and final domain validation across visual, audio, data, and business outputs.
  • Host-aware waiting avoids model polling loops, JavaScript timers, heartbeats, and hidden long-execution workarounds.
  • Semantic decision points can end the current queue so the active model can review results before downstream work starts.
  • Optional compression guidance is available for oversized logs when compatible RTK or Context Mode infrastructure already exists.
  • Task handoff guidance supports fresh-chat transitions and reusable skill extraction without globally monitoring conversations or automatically creating automations.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*