# Harness loop

> Harness loop is an open-source agent skill for developer tools. Runs long Plans.md tasks in repeated wake-ups, each with fresh context. It is available on Claude Code.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code
- **Website:** https://github.com/Chachamaru127/claude-code-harness/tree/main/skills/harness-loop
- **Repository:** https://github.com/chachamaru127/claude-code-harness
- **GitHub stars:** 3,232
- **License:** MIT
- **Skill name:** harness-loop
- **Collection:** https://github.com/Chachamaru127/claude-code-harness
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-01

## About

Harness Loop is a meta-skill for Claude Code that pairs the dynamic /loop mode with ScheduleWakeup so a long task can be worked through across many wake-ups. Each cycle starts with a fresh context, reloads a resume pack from harness-mem, and hands one task to a worker agent running in an isolated git worktree. The skill then runs a lead review of the worker's commit, cherry-picks approved changes into the main branch, and updates the plan file.

The loop also watches for trouble. It consults an advisor only at fixed trigger points such as high-risk tasks or a repeated failure, checks for review plateaus using a helper script, enforces a maximum cycle count, and stops when a pivot is required. Pacing presets set how long each wake-up waits, from a few minutes for worker jobs to an hour for overnight runs.

The skill expects a Plans.md file in the host project and the Harness plugin bundle installed so its helper scripts resolve. It is built for Claude Code and relies on Claude Code's loop and scheduling features, and it asks users to start runs with an explicit plan name when several plan files exist.

## When your agent uses it

> Long-running task loop using /loop (Claude Code dynamic mode) and ScheduleWakeup to re-enter with fresh context on each wake-up. Internally invokes harness-work through Agent. Trigger: long-running, loop, wake-up, autonomous. Do NOT load for: one-shot task execution, review, release, planning.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/Chachamaru127/claude-code-harness/tree/HEAD/skills/harness-loop)
- [Asks for: Read, Edit, Bash, Task, ScheduleWakeup, mcp__harness__harness_mem_resume_pack, mcp__harness__harness_mem_record_checkpoint](https://github.com/Chachamaru127/claude-code-harness/blob/HEAD/skills/harness-loop/SKILL.md)
- [License: MIT](https://github.com/Chachamaru127/claude-code-harness/tree/HEAD/skills/harness-loop)

## Features

- **Fresh-context re-entry:** Each wake-up restarts the task with a reloaded resume pack instead of carrying over prior context.
- **Isolated worker cycles:** One task is handed to a worker agent in its own git worktree, then reviewed before merging.
- **Lead review and cherry-pick:** Worker commits are reviewed and approved changes are cherry-picked into the main branch.
- **Plateau and cycle limits:** Helper scripts detect review plateaus and a maximum cycle count stops runaway loops.
- **Selective advisor consults:** An advisor is consulted only at fixed trigger points such as high-risk tasks or repeated failures.
- **Configurable pacing modes:** Preset delays between wake-ups cover worker jobs, CI waits, plateaus and overnight runs.

## Good for

- Work through all open tasks in a plan file over several hours
- Run a limited batch of tasks with a fixed maximum number of cycles
- Process a range of task numbers overnight with long wake-up delays
- Check the status of a running loop or stop it
- Resume a multi-step implementation across sessions with saved checkpoints

## Install

### Claude Code

This skill ships in the `harness` plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

```sh
/plugin marketplace add Chachamaru127/claude-code-harness
/plugin install harness@claude-code-harness-marketplace
```

Or copy only this skill to `~/.claude/skills/harness-loop`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/Chachamaru127/claude-code-harness.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/harness-loop &&
cp -R "$tmp/skills/harness-loop" ~/.claude/skills/harness-loop &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/harness-loop` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/harness-loop` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/Chachamaru127/claude-code-harness.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/harness-loop &&
cp -R "$tmp/skills/harness-loop" ~/.agents/skills/harness-loop &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/harness-loop` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/harness-loop` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/Chachamaru127/claude-code-harness.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/harness-loop &&
cp -R "$tmp/skills/harness-loop" ~/.cursor/skills/harness-loop &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/harness-loop` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/Chachamaru127/claude-code-harness.git --path skills/harness-loop
```

Or copy the folder to `~/.gemini/skills/harness-loop` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/harness-loop`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/Chachamaru127/claude-code-harness.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/harness-loop &&
cp -R "$tmp/skills/harness-loop" ~/.copilot/skills/harness-loop &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/harness-loop` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/Chachamaru127/claude-code-harness.git
```

Then copy `claude-code-harness/skills/harness-loop` into your agent's skills folder as `harness-loop`. Agents that support SKILL.md read one folder per skill.

## FAQ

### When should Harness loop not be used?

The skill's trigger notes say not to load it for one-shot task execution, reviews, releases or planning.

### What does the skill need to run?

It needs a Plans.md file in the host project, Claude Code's dynamic loop and ScheduleWakeup features, and the Harness plugin bundle so its helper scripts resolve.

### How long does Harness loop wait between cycles?

Pacing presets set the delay: worker and CI modes use 270 seconds, plateau mode 1200 seconds and night mode 3600 seconds. Delays are clamped between 60 and 3600 seconds.

### What happens when the loop reaches its limit?

By default it stops after 8 cycles, and --max-cycles changes that number. It also stops when a pivot is required or when no unfinished tasks remain.

### How do I install Harness loop in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/harness-loop to use it in all your projects, or to .claude/skills/harness-loop in one project. Or install the harness plugin, which includes it: /plugin marketplace add Chachamaru127/claude-code-harness, then /plugin install harness@claude-code-harness-marketplace.

### Does Harness loop run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Harness loop?

Claude Code. It reads skills in the SKILL.md format; the install steps on this page show where to put the folder.

### What are the best alternatives to Harness loop?

The closest alternatives to Harness loop are Harness work, Dynamic workflow mode, Harness setup, Breezing and Autonomous loops.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Harness work](https://ai-powered.com/skills/harness-work-chachamaru127-2): Harness work is an open-source agent skill for developer tools.
- [Dynamic workflow mode](https://ai-powered.com/skills/dynamic-workflow-mode): Dynamic workflow mode is an open-source agent skill for developer tools.
- [Harness setup](https://ai-powered.com/skills/harness-setup-chachamaru127): Harness setup is an open-source agent skill for developer tools.
- [Breezing](https://ai-powered.com/skills/breezing-chachamaru127-2): Breezing is an open-source agent skill for developer tools.
- [Autonomous loops](https://ai-powered.com/skills/autonomous-loops): Autonomous loops is an open-source agent skill for developer tools.
- [Plan loop](https://ai-powered.com/skills/plan-loop): Plan loop is an open-source agent skill for developer tools.
- [Autonomous agent harness](https://ai-powered.com/skills/autonomous-agent-harness): Autonomous agent harness is an open-source agent skill for developer tools.
- [Harness engineering lifecycle](https://ai-powered.com/skills/harness-engineering-lifecycle): Harness engineering lifecycle is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/harness-loop-chachamaru127-2
