t800-loop

t800-loop is a command for Claude Code from Khar-AG/t-800-agent. It costs 0 tokens per session (1,112 once invoked), scanned A, original, MIT.

A semi-manual workflow for reviewing the results of a previous development run and preparing a queue of fixes. HITL means a human reviews or approves the queued work before fixes are applied in batches.

In plain words
What is it for?
Use it after a run to collect lessons, create a human-reviewed fix queue, and apply the resulting fix packages with the related fix command.
Why use it?
It turns reported lessons into explicit fix packages while allowing a person to pause or review the process. It avoids automatically continuing work after a run ends.

Command for Claude Code

Written for Claude Code: a Claude Code command (commands/*.md).

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is bash scripts/discover-target-project.sh --workspace "<WORKSPACE>" [--plugin-root "<PLUGIN_ROOT>"].

Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/Khar-AG/t-800-agent
agentmods
npx agentmods add commands/khar-ag/t-800-agent/t800-loop

Made for: Claude Code.

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 t800-loop

README.md
[![agentmods](https://agentmods.dev/badge/commands/khar-ag/t-800-agent/t800-loop.svg)](https://agentmods.dev/commands/khar-ag/t-800-agent/t800-loop)
Your own site
<a href="https://agentmods.dev/commands/khar-ag/t-800-agent/t800-loop"><img src="https://agentmods.dev/badge/commands/khar-ag/t-800-agent/t800-loop.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,112 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.1 $0.00000 $0.01112
Opus 5 $0.00000 $0.00556
Sonnet 5 $0.00000 $0.00222
Haiku 4.5 $0.00000 $0.00111

Measured 6d ago against content hash f7cbaafef82d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

t800-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 6d 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.

commands/t800-loop.md · 119 lines

How it starts

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

/t800-loop — semi-manual Loop Engineering batch

Зачем: после прогона (report + lessons) — HITL-очередь в {memory_path}/loop-queue.md, затем batch /t800-fix по fix-packs. Не автопродолжение через stop/followup.

Контракт: shared/loop-engineering-contract.md (v2).
Схема lessons: shared/lesson-schema-contract.md (v1.1 — status open|applied|rejected).

0. Discovery + pause

bash scripts/discover-target-project.sh --workspace "<WORKSPACE>" [--plugin-root "<PLUGIN_ROOT>"]
bash scripts/t800_loop_state.sh init --memory-path "<memory_path>"

Если существует {memory_path}/.loop-pausedстоп. Сообщи пользователю; не зови conductor.

1. Первая обязанность — conductor

Task(t-800-loop-conductor)

Передай полный контекст:

  • memory_path
  • plugin_root
  • run_id (если известен; иначе conductor берёт последний run)
  • цель пользователя / HITL-заметки

Если Task(t-800-loop-conductor) недоступен:

Task(generalPurpose)

Промпт: полное содержимое agents/t-800-loop-conductor.md из плагина.

2. Материализация loop-queue

Conductor readonly — не пишет loop-queue.md. Родитель:

# stdin = JSON handoff (queue_patch) от conductor
python3 scripts/t800_loop_queue_write.py --memory-path "<memory_path>"

Путь: {memory_path}/loop-queue.md.

Open / Closed (Lesson Lifecycle v1.1):

  • Open (status=open или поле отсутствует) — кандидаты на HITL approve
  • Closed (applied | rejected) — показать без action; не просить approve
  • Повторный /t800-loop при пустом Open → заглушка «нет открытых уроков», approve не просят

3. Опционально — classify / fixpack (только LOW + open)

Если lessons ещё без risk_class или нужен refresh:

python3 scripts/t800_risk_classifier.py --patch-file "<lesson.json>" --memory-path "<memory_path>"

Для LOW AND open only (после classifier, не LLM; schema v1.1):

python3 scripts/t800_lessons_to_fixpack.py --memory-path "<memory_path>" --lessons "<run_id|path/to/lessons.json>"

Read the full file on GitHub · 119 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. 6d ago First seen · 119 lines · 0 tokens per session scan A f7cbaafef82d

Subscribe to this mod's changes

t800-loop is a command published in the GitHub repository Khar-AG/t-800-agent (8 stars, last pushed 10d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,112 tokens. 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.