Skip to main content
plugin

agent-harness — Claude Code plugin: a bounded agentic loop

Turns a domain folder of skills into a bounded loop: the agent picks up a goal, compiles it into tasks, executes, verifies and closes only when everything checks out.

Install into Claude Code · Plugin marketplace All methods and platforms ↓
/plugin marketplace add alirezarezvani/claude-skills
/plugin install agent-harness@claude-code-skills
Open on GitHub

What agent-harness does

The plugin builds a bounded agentic loop out of a domain folder. A goal goes through a compiler, becomes a task plan, and a controller then drives execute-and-verify rounds until nothing is left open.

Three stdlib Python tools do the work. harness_manifest_builder.py scans a domain folder and produces a manifest of skills, tools and checks. goal_compiler.py turns a goal plus that manifest into a task plan, and it refuses vague goals, asking forcing questions instead. loop_controller.py runs the init/next/record/verify/close/status state machine and executes the checks itself rather than trusting a report from the executor. You also get 18 committed per-domain manifests, a JSON schema, three references on agentic-loop design, a harness-runner subagent and the /cs-harness command.

Retry caps are set up front. Once a budget runs out, the loop escalates to a human instead of pretending the task succeeded, and the close gate stays shut while any task is unverified or unwaived. Nothing beyond the Python standard library is required.

What it helps with

  • drive a goal to a verified close without babysitting every step
  • get checks run by the controller instead of the executor's own report
  • cap retries so the loop cannot spin forever
  • hand a task to a human when the attempt budget is spent
  • block closing while unverified tasks remain

Example prompts for the agent

  • /cs-harness backend add retries to the queue client
  • build a manifest for the frontend domain and list its checks
  • compile this goal into a task plan and tell me what is missing

How to install agent-harness

Plugin marketplace

/plugin marketplace add alirezarezvani/claude-skills
/plugin install agent-harness@claude-code-skills

Step by step, with commands for each platform: Claude Code plugins: marketplaces, installing, and building your own

Questions about agent-harness

How do I install agent-harness in Claude Code?

From the marketplace: run /plugin marketplace add alirezarezvani/claude-skills, then /plugin install agent-harness@claude-code-skills.

What does agent-harness do?

It turns a domain folder into a bounded loop: a goal becomes a task plan, tasks get executed and verified, and the loop closes only after verification passes.

What do I need for it to run?

Python from the standard library. All three tools run without third-party packages and emit JSON.

Source text

agent-harness · MIT
# agent-harness

Turn any domain folder of this repo into a **bounded agentic loop**: pick up a goal,
compile it into tasks with machine-run verification, execute, verify, retry with caps,
escalate to a human when budgets exhaust, and close only when everything is verified.

```
GOAL → goal_compiler → PLAN → loop_controller: [execute → verify]* → CLOSE
                                     ↑ retry ≤ caps, changed approach
                                     └ ESCALATE — never fake success
```

## What ships

| Piece | Purpose |
|---|---|
| `scripts/harness_manifest_builder.py` | Scan a domain folder → `manifest.v1` JSON (skills, tools, checks, agentic signals) |
| `scripts/goal_compiler.py` | Goal + manifest → `plan.v1` task plan; refuses vague goals (exit 3, forcing questions) |
| `scripts/loop_controller.py` | `init/next/record/verify/close/status` state machine; controller runs checks itself |
| `assets/harnesses/*.json` | 18 committed per-domain manifests (regenerable, diff-stable) |
| `assets/harness_manifest.schema.json` | Manifest schema |
| `references/` | Agentic-loop canon, verification discipline, domain-harness design (cited) |
| `agents/harness-runner.md` | Stateless one-task-per-invocation executor |
| `commands/cs-harness.md` | `/cs-harness <domain> <goal>` end-to-end driver |

All tools are stdlib-only, pass `--help` and `--sample`, and emit JSON.

## Design lineage

Anthropic's long-running-agents harness (feature-list + stateless shifts), verifier's law,
SWE-agent's environment-feedback lesson, Ralph-loop fresh-context iteration, Cognition's
serialize-writers rule, and this repo's own tc-tracker / autoresearch locked-evaluator /
loop-library stop-state primitives. See `skills/agent-harness/references/`.

© Alireza Rezvani · MIT · alirezarezvani/claude-skills

Similar plugins

All plugins for Agent setup: memory, context, orchestration →

From the same set394

The whole set →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor