autonomous-loop

A command for setting up an autonomy loop, a repeated process that lets several unattended coding agents work through a shared task list.

In plain words
What is it for?
It is for creating or using tasks.txt, launching multiple loop runners, and sharing work through current_tasks/.
Why use it?
It helps agents avoid taking the same task and coordinates their work with lock files, which mark tasks as claimed.

Command

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.

agentmods
npx agentmods add commands/hoja-solutions/agent-stdlib/autonomous-loop
Clone the repo
git clone --depth 1 https://github.com/Hoja-Solutions/agent-stdlib
Per session 20 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 468 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00020 $0.00468
Opus 5 $0.00010 $0.00234
Sonnet 5 $0.00004 $0.00094
Haiku 4.5 $0.00002 $0.00047

Measured yesterday against content hash e683b1fc0290, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

autonomous-loop 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 yesterday.

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.

commands/autonomous-loop.md · 45 lines

What it actually says

Help the user run the parallel-autonomous-agents pattern from this pack. Follow the parallel-autonomous-agents skill.

Context for what they passed: $ARGUMENTS

The loop itself runs in the shell, not inside this session, because it spawns many fresh headless agent sessions over time. Your job here is to set it up and explain it, not to run an overnight loop yourself.

Do this:

  1. Build the task list. If they gave a tasks file, use it. Otherwise turn their goal into a tasks.txt with one independent, self-contained task per line. Tasks that touch the same files should be separate lines so agents do not collide on them.

  2. Explain the coordination. The lock registry (scripts/locks.py) is how agents avoid duplicating work: claiming a task atomically creates a lock file, and only one agent can win the race. Stale locks (from a crashed agent) get reaped after a threshold.

  3. Show how to launch. Each agent is one copy of the loop runner:

    scripts/autonomy_loop.sh tasks.txt agent-1
    

    Run several copies in parallel (separate terminals or containers), each with a distinct agent id. They share current_tasks/ and stay off each other's work. The loop calls claude -p by default; for another harness set AGENT_RUNNER, e.g. AGENT_RUNNER="opencode run" scripts/autonomy_loop.sh tasks.txt agent-1.

  4. Point at the steering mechanism. With no human in the loop, the test suite is the steering wheel. Confirm they have a comprehensive suite and that its output is machine-readable (single-line ERROR: <reason> results an agent can grep), per the skill.

Do not start a long-running loop from this session. Hand the user the commands and let them run it where they can watch it.

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. yesterday First seen · 45 lines · 20 tokens per session scan A e683b1fc0290

Subscribe to this mod's changes

autonomous-loop is a command published in the GitHub repository Hoja-Solutions/agent-stdlib (1 stars, last pushed 1mo ago), licensed MIT. It adds 20 tokens to every session and 468 once invoked, about $0.0001 per session on Opus 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-08-31.