Catalogue / terminal-bench-loop
terminal-bench-loop
MITSignedRun one Terminal-Bench task through a bounded Paperclip smoke/diagnosis/fix loop. Use when asked to drive Terminal-Bench until it passes, rerun a Terminal-Bench loop, or iterate with board-gated fixes and diagnosis.--- name: terminal-bench-loop description: > Run one Terminal-Bench task through a bounded Paperclip smoke/diagnosis/fix loop. Use when asked to drive Terminal-Bench until it passes, rerun a Terminal-Bench loop, or iterate with board-gated fixes and diagnosis. ---
Terminal-Bench Loop
A repeatable operating skill for driving one Terminal-Bench problem to a passing smoke through Paperclip, with explicit issue topology, bounded runs, board-gated product fixes, and worktree continuity.
This skill is operational + diagnostic, not engineering. It coordinates issues, artifacts, and approvals around a Terminal-Bench loop. It does not authorize code changes — product fixes require a board confirmation before implementation.
Every loop issue must rest in an allowed state: terminal (done/cancelled), explicitly live (active run / queued wake), explicitly waiting (in_review with participant/interaction/approval), or explicit recovery/blocker (blocked with blockedByIssueIds and a named owner).
When to use
Trigger on an assignment whose title or body matches any of:
- "run Terminal-Bench in a loop", "loop \<task-name\> through Paperclip"
- "drive Terminal-Bench fix-git", "iterate on Terminal-Bench until it passes"
- "Terminal-Bench smoke loop", "bench loop", "smoke loop on \<task-name\>"
- An attached link to a Terminal-Bench loop parent issue, plus a request to do another iteration
Also use when the user hands you an existing top-level loop issue and asks for the next iteration, diagnosis, or rerun.
When NOT to use
- The assignment is to build or change
paperclip-benchitself (Harbor adapter, wrapper, telemetry). Use normal engineering flow on that repo. - The assignment is to submit a benchmark result for ranking. This skill produces smoke/non-comparable runs by design — escalate full-suite or comparable runs to BenchmarkQualityManager.
- The assignment is a normal Paperclip product bug not surfaced by a Terminal-Bench loop. Use normal investigation.
- You have not been granted permission to install or assign company skills, and the asker actually wants library mutation. Hand that step to an authorized skill-library owner.
Three invariants you must preserve
Every loop iteration and every proposed product fix must hold these three invariants together. They come from /diagnose-why-work-stopped and the user has restated them across the liveness work:
- Productive work continues. Each loop issue must always have a clear next action owner — agent, board, user, or named blocker. No silent
in_reviewwith nothing waiting on it. - Only real blockers stop work. Stops happen when something genuinely cannot proceed (board confirmation, QA, missing credentials, exhausted budget). Pseudo-stops must be detected and routed.
- No infinite loops. Iteration count, wall-clock budget, and a board gate before product fixes are applied keep the loop bounded.
If a proposed iteration violates any of the three, drop it or rework it. State explicitly in the loop issue how each invariant is held this iteration.
Inputs
Collect these on the top-level loop issue before iteration 1. Any input that cannot be supplied is a blocker — name the unblock owner and stop.
- Source issue. The Paperclip issue that asked for the loop. The loop parent links back to it.
- Terminal-Bench task name. Single-task identifier (e.g.
terminal-bench/fix-git). Multi-task suites are out of scope for this skill. - Iteration budget. Maximum number of iterations before the loop must stop without further fixes (typical: 3–5). Also record a per-iteration wall-clock cap.
- Paperclip App worktree issue. The implementation-side issue under the Paperclip App project whose execution workspace owns the isolated worktree. Use the current issue's isolated worktree for the default workflow; the optional task-tree procedure below records its owning issue.
- Benchmark command. The exact
paperclip-benchinvocation, including thePAPERCLIPAI_CMD(or equivalent) binding pinned to the Paperclip App worktree under test. Record verbatim on the loop issue. - Dispatch runner config. The exact Harbor/Paperclip runner dispatch config required for the smoke to actually start a Paperclip heartbeat. For the current Harbor wrapper, record the
PAPERCLIP_HARBOR_RUNNER_CONFIGJSON (or equivalent config file) verbatim enough to preserve:assignee,heartbeat_strategy,agent_adapter/agent_adapters,reuse_host_homewhen local credentials are intentionally needed, and the stop budget. A bare Harbor command that createsBEN-1as unassignedtodowith zero heartbeat-enabled agents is a harness/setup failure, not a valid product diagnosis. - Latest artifact root. Filesystem or storage path under which
paperclip-benchwrites run artifacts (manifest,results.jsonl, Harbor raw job folders, redacted telemetry). Each iteration appends; nothing is overwritten. - Approval policy. Who must accept a proposed product fix before implementation (default: board via
request_confirmation; CTO if delegated; never the loop driver alone).
Record each input on the top-level loop issue (description or a dedicated inputs document). If any input changes mid-loop, note the change and the iteration it took effect.
Default workflow
Run the smoke, diagnosis, approved fix, and rerun on the current issue. Record each iteration in its documents. Save a fix proposal as plan, read back its latest revision, and request board confirmation bound to that revision before implementation. Use the same isolated worktree for the fix and rerun. Keep the iteration budget, evidence requirements, and QA/CTO review gates below; use the current issue's review participants or approval interactions for those gates.
The task-tree procedure below applies only when the user explicitly requests separate tasks or when continuing an existing tree. Do not propose a task tree merely to run this workflow. For the default workflow, iteration records replace iteration children, and plan approval and review waits stay on the current issue.
Optional issue topology
For an explicitly requested task tree:
- Top-level loop issue. Long-lived. Holds inputs, iteration counter, current state, links to every iteration child, and the product-rule history. Rests in
in_progresswhile an iteration is running,in_reviewonly when a typed waiter sits directly on the loop parent (execution-policy participant,request_confirmation/ask_user_questions/suggest_tasksinteraction, approval, or named human owner),blockedwithblockedByIssueIdswhile a child issue is the gating work (iteration child holding the fix-proposalrequest_confirmation, or implementation, QA, or CTO review children),doneon pass, orcancelledon board-rejection / budget exhaustion. - Iteration child issues. One per iteration. Each carries: a bounded run issue (smoke), a diagnosis issue (applies
/diagnose-why-work-stopped), a fix-proposal document with arequest_confirmationinteraction, and — only after acceptance — implementation, QA, CTO review, and rerun children. Iteration children are blocked by their predecessors so the executor wakes them in order. - Paperclip App implementation issue. The first iteration creates a fresh Paperclip App child whose project policy spawns an isolated worktree. Every later iteration's implementation/rerun child references that same execution workspace via
inheritExecutionWorkspaceFromIssueIdso the same worktree is amended and tested.
Wire dependencies with blockedByIssueIds, never with prose like "blocked by X". When a dependent child is done, the executor auto-wakes the next.
Procedure for an explicitly requested task tree
0. Read the current execution contract
Before opening or advancing a loop, use these terms when classifying loop-issue state: live path / waiting path / recovery path; post-run disposition; bounded continuation; productivity review; pause-hold; watchdog. Do not invent a new state.
1. Open or reuse the top-level loop issue
- If an existing loop issue is supplied, read it: inputs, iteration counter, last iteration's stop reason, current Paperclip App worktree pointer, latest benchmark command.
- If no loop issue exists, create one under the Paperclip App project (or the project the source issue points at). Title:
Terminal-Bench loop: <task-name>. Description captures the inputs above, the iteration budget, and a link to the source issue. - Verify the worktree pointer still resolves. If the recorded execution workspace was discarded (worktree pruned, project changed), the loop is blocked — name the unblock owner (CodexCoder or the Paperclip App owner) and stop.
2. Open the iteration child
- Increment the iteration counter on the loop issue.
- Create an iteration child titled
Iteration N: <task-name>. Its description repeats the inputs and references the loop parent. Block it on the prior iteration's terminal child (if any) so the executor cannot start two iterations in parallel. - If the iteration counter would exceed the budget, do not create the child. Move the loop issue to
cancelled(budget exhausted) orin_reviewif the user must decide whether to extend the budget.
3. Run the bounded smoke
- The benchmark command must use the Paperclip App worktree under test. Set
PAPERCLIPAI_CMD(or the equivalent command binding) to the CLI entrypoint inside that worktree. Never let the smoke run against the operator's current Paperclip checkout. - The same command block must include the runner dispatch config that makes the benchmark issue actionable. For the current Harbor wrapper, export
PAPERCLIP_HARBOR_RUNNER_CONFIGwith the intended assignee, heartbeat strategy, agent adapter, credential/home mode, and stop budget. Do not treat a bareuvx harbor run ...as the canonical smoke if it omits the dispatch config; record that as a harness/setup miss and rerun with the recorded config. - Bound the run by wall-clock and by Paperclip's run-budget controls. If the smoke would exceed the per-iteration cap, kill it and record the truncation reason.
- Capture, in the iteration child or a dedicated
rundocument: - Paperclip run id and heartbeat run ids
- benchmark run id, manifest,
results.jsonlrow, Harbor raw job folder - dispatch config used (
PAPERCLIP_HARBOR_RUNNER_CONFIGor equivalent), including assignee and adapter type - the exact stop reason reported by the harness (pass, harness fail, verifier fail, timeout, agent gave up, infrastructure error)
- heartbeat-enabled and heartbeat-observed agent counts when Paperclip telemetry exports them
- failure taxonomy bucket (task/model, Paperclip product, harness/setup, verifier/infrastructure, security, unclear)
- artifact paths under the latest artifact root
- Label the iteration as smoke / non-comparable. Comparable runs are out of scope for this skill.
4. Diagnose the exact stop point
Apply the /diagnose-why-work-stopped pattern to the iteration's run, scoped to this loop only — do not pull in unrelated forensic boilerplate. Specifically:
- Walk the Paperclip issue tree the smoke produced under the Paperclip App worktree, node by node, and find the exact
(issue, status)combination that stopped progress. Quote evidence: run ids, comment timestamps, status transitions. - Classify every non-progressing issue in that subtree as truly needs human/board intervention, agent-actionable but not currently routed, or already covered.
- State whether the failure is task/model, Paperclip product, harness/setup, verifier/infrastructure, security, or unclear. Be explicit when evidence is inferred (e.g. cross-company API boundary blocks direct reads).
Preview shortened. The full SKILL.md is in the pack.
| File | Size | SHA-256 |
|---|---|---|
| SKILL.md | 25.9 kB | d74a56c49db1 |
| SKILVAULT_SOURCE.json | 1.2 kB | a2baff7900af |
| THIRD_PARTY_NOTICES.md | 1.1 kB | 85510d0433e1 |
Published verbatim from the pinned commit. Nothing is rewritten.
| Version | Pinned commit | Signed | |
|---|---|---|---|
| 0.1.0 Current | 7a2ee0da1cad | 23 Nov 2026 |
Locking a skill to one version needs Pro.