auto-iter-stream

auto-iter-stream is a command for Claude Code from proggarapsody/bitbottle. It costs 43 tokens per session (762 once invoked), scanned A, original, MIT.

A command that runs several automated iteration cycles one after another, up to a specified limit. Each cycle finishes its release steps before the next begins.

In plain words
What is it for?
Running a bounded batch of /auto-iter cycles and recording whether the stream completed, reached its limit, or stopped early.
Why use it?
It removes the need to start each cycle manually while stopping when the limit is reached or a halt condition occurs.

Command for Claude Code

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/proggarapsody/bitbottle/auto-iter-stream
Clone the repo
git clone --depth 1 https://github.com/proggarapsody/bitbottle

Made for: Claude Code.

Per session 43 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 762 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.00043 $0.00762
Opus 5 $0.00022 $0.00381
Sonnet 5 $0.00009 $0.00152
Haiku 4.5 $0.00004 $0.00076

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

Security

Grade A, and why

auto-iter-stream 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 3d 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.

.claude/commands/auto-iter-stream.md · 77 lines

How it starts

The opening of the file, as written. The whole thing — 77 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/auto-iter-stream — Claude Code adapter

Chain-loop mechanic: run N /auto-iter cycles back-to-back with no inter-cycle wait. Lock/halt/cadence/metrics: see .claude/commands/auto-iter.md. Full procedure: docs/workflows/iteration-cycle/README.md.

Argument parsing

max = $1 (first arg). Validation:

  • Missing or empty → error, exit immediately. Do not default.
  • Not a positive integer → error, exit.
  • > 10 → error, exit. (Hard ceiling; raise manually if genuinely needed.)

Announce: stream started — max=<N>, ran=0.

Pre-flight

LOCK=.claude/auto-iter/.lock
if [ -f "$LOCK" ]; then
    LOCK_AGE_MIN=$(( ($(date +%s) - $(stat -f %m "$LOCK" 2>/dev/null || stat -c %Y "$LOCK")) / 60 ))
    [ "$LOCK_AGE_MIN" -lt 60 ] && exit  # abort — another cycle is running
fi

Log stream start: {"ts":"<ISO>","stream":"started","max":<N>,"ran":0}

Loop logic

ran = 0
while ran < max:
    execute one full /auto-iter cycle (per .claude/commands/auto-iter.md)
    cycle_outcome = <last line in cycles.jsonl written by this cycle>

    if cycle_outcome starts with "halt_" OR cycle_outcome == "skip_in_progress":
        final_outcome = "stream_halted"; break

    if cycle_outcome == "shutdown_confirmed":
        final_outcome = "stream_shutdown"; break

    ran += 1

if ran == max: final_outcome = "stream_max_reached"

append: {"ts":"<ISO>","stream":"completed","stream_started":"<ISO>","max":<N>,"ran":<ran>,"final_outcome":"<final_outcome>"}

stream_* outcomes

Value Meaning
stream_max_reached ran = max, all cycles shipped
stream_halted a halt_* stopped the chain
stream_shutdown BACKLOG empty + 3 empty brainstorms
stream_aborted_lock_held pre-flight found a fresh lock

Halt routing

Mid-cycle halts (halt_release, CI red, pre-merge BLOCKER) are handled inside each /auto-iter cycle. ship reply → cycle ships, stream continues. hold reply → halt_release outcome → stream stops.

Read the full file on GitHub · 77 lines

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. 3d ago First seen · 77 lines · 43 tokens per session scan A e95de38fd000

Subscribe to this mod's changes

auto-iter-stream is a command published in the GitHub repository proggarapsody/bitbottle (3 stars, last pushed 15d ago), licensed MIT. It adds 43 tokens to every session and 762 once invoked, about $0.0002 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.