# Harness Loop

HAR: Codex-native long-running loop runner.

- Repository: https://github.com/Chachamaru127/claude-code-harness (3190 stars)
- Category: Engineering
- License: MIT
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add Chachamaru127/claude-code-harness --skill harness-loop -g -a claude-code -y`
Codex: `npx skills add Chachamaru127/claude-code-harness --skill harness-loop -g -a codex -y`
Cursor: `npx skills add Chachamaru127/claude-code-harness --skill harness-loop -g -a cursor -y`
Gemini CLI: `npx skills add Chachamaru127/claude-code-harness --skill harness-loop -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add Chachamaru127/claude-code-harness`

## Description

HAR: Codex-native long-running loop runner. Uses a real background runner that executes one ready batch per cycle through Breezing by default, with status/stop controls. Trigger: long-running, loop, autonomous, background, Codex. Do NOT load for: one-shot implementation, normal review, release.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Harness Loop

Codex 版の `harness-loop` は、説明だけの擬似ループではなく、
**実際にバックグラウンドで回るランナー**を起動する。

## ひとことで

`$harness-loop` は、1 回だけの実装依頼ではなく、
「今すぐ実行できる未完了タスクのまとまりを、Breezing で自動実行し続ける当番」を起動する入口。

ここでいう `ready batch` は、Depends が満たされていて、今すぐ並列実行できる `cc:TODO` / `cc:WIP` のまとまり。
1 cycle は 1 task ではなく、原則として 1 ready batch を処理する。

## たとえると

人が横でずっと見張る代わりに、
「同時に進められる作業をまとめて見つける → Breezing に任せる → 結果を確認する → 次のまとまりへ進む」
を繰り返す監督係を、裏で常駐させるイメージ。

## Quick Reference

| 入力 | 動作 |
|------|------|
| `$harness-loop all` | 未完了タスク全体を長時間ループで開始 |
| `$harness-loop 41.1-41.4` | 範囲を絞って開始 |
| `$harness-loop JLB3R-02..JLB3R-08` | Plans.md の task ID 順で範囲を絞って開始 |
| `$harness-loop all --max-cycles 3` | 最大 3 サイクルで停止 |
| `$harness-loop all --max-workers 4` | 1 cycle の ready batch を最大 4 worker までに制限 |
| `$harness-loop all --max-workers max` | ready batch 内で実行可能なタスク数を上限として並列化 |
| `$harness-loop all --plan roadmap` | named Plans の `roadmap` を対象にループ実行 |
| `$harness-loop all --executor task` | 旧来の 1 task per cycle local worker 実行へ逃がす |
| `$harness-loop all --pacing night` | サイクル間の待機を長めにする |
| `$harness-loop status` | 現在の実行状況を確認 |
| `$harness-loop stop` | 進行中ジョブを止めてループ停止要求を出す |

## 実行コマンド

### 開始

```bash
harness codex-loop start all
```

範囲指定:

```bash
harness codex-loop start 41.1-41.4 --max-cycles 5 --pacing worker
harness codex-loop start JLB3R-02..JLB3R-08 --max-cycles 5 --pacing worker
harness codex-loop start all --max-workers max --pacing worker
harness codex-loop start all --plan roadmap --max-cycles 5
harness codex-loop start all --executor task --max-cycles 5
```

`START..END` は、`Plans.md` に並んでいる task ID をそのまま使う範囲指定。
英字やハイフンを含む task ID は `..` を優先する。
`41.1-41.4` のような従来の数値レンジも引き続き使える。

The rest: https://github.com/Chachamaru127/claude-code-harness/blob/HEAD/codex/.codex/skills/harness-loop/SKILL.md
