long-running-jobs

long-running-jobs is a skill for Claude Code, Codex from shibing624/agentica. It costs 68 tokens per session (395 once invoked), scanned A, original, Apache-2.0.

A procedure for starting and watching work that must continue after the current terminal session ends, such as training, servers, or remote queue jobs. It uses process tools such as tmux, nohup, or setsid plus a completion marker and watcher.

In plain words
What is it for?
Use it to launch long-running local or remote work, record its exit status, monitor it while the session remains open, and check the completion marker after reconnecting.
Why use it?
A normal background command may stop when the session closes, and it may provide no reliable completion notice. The watcher reports success, failure, or disappearance of the job from its marker and logs.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to launch long-running local or remote work, record its exit status, monitor it while the session remains open, and check the completion marker after reconnecting.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/shibing624/agentica/long-running-jobs
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add shibing624/agentica --skill long-running-jobs
Clone the repo
git clone --depth 1 https://github.com/shibing624/agentica

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for long-running-jobs

README.md
[![agentmods](https://agentmods.dev/badge/skills/shibing624/agentica/long-running-jobs/github.svg)](https://agentmods.dev/skills/shibing624/agentica/long-running-jobs)
Your own site
<a href="https://agentmods.dev/skills/shibing624/agentica/long-running-jobs"><img src="https://agentmods.dev/badge/skills/shibing624/agentica/long-running-jobs/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for long-running-jobs

Your own site · 80×15
<a href="https://agentmods.dev/skills/shibing624/agentica/long-running-jobs"><img src="https://agentmods.dev/badge/skills/shibing624/agentica/long-running-jobs.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 68 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 395 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00068 $0.00395
Opus 5.5 $0.00027 $0.00158
Sonnet 5.5 $0.00014 $0.00079
Haiku 4.5 $0.00007 $0.00040

Measured 4d ago against content hash 295cd62d629f, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

long-running-jobs scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

agentica/skills/bundled/long-running-jobs/SKILL.md · 34 lines

What it actually says

Long-running jobs

execute(background=True) belongs to this session: it is stopped when the session exits. A job that must outlive the session goes in tmux / nohup / setsid, and from then on nothing reports its end: /ps does not list it and no exit reaches you.

So launch it to leave a completion marker and, in the same step, start one background watcher that turns the marker into a completion. Do not wait to be asked. Polling is right here because there is no event to wait on; the watcher only reads, and exits non-zero if the job vanished without a marker:

execute(command="tmux new-session -d -s train 'python train.py > train.log 2>&1; echo $? > train.exit'")
execute(command="while [ ! -f train.exit ]; do tmux has-session -t train 2>/dev/null || [ -f train.exit ] || { echo 'train gone, no exit file'; tail -20 train.log; exit 2; }; sleep 60; done; tail -20 train.log; exit $(cat train.exit)", background=True)

The same watcher fits any job you did not start here (a job queue, a remote run): loop on whatever condition marks it done.

Tell the user the watcher dies with this session while the job keeps running. After a restart, read the marker before assuming anything.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 34 lines · 68 tokens per session scan A 295cd62d629f

Subscribe to this mod's changes

long-running-jobs is a skill published in the GitHub repository shibing624/agentica (359 stars, last pushed today), licensed Apache-2.0. It adds 68 tokens to every session and 395 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-28.