Cwc Long Running Agents banner
anthropics anthropics

Cwc Long Running Agents

AI community

Description

Claude Code's built-in [`/goal`](https://code.claude.com/docs/en/goal) command gives you a generator/evaluator loop out of the box: set a completion condition and a separate fast model checks it after

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

Harness Primitives for Long-Running Claude Agents

Claude Code's built-in [`/goal`](https://code.claude.com/docs/en/goal) command gives you a generator/evaluator loop out of the box: set a completion condition and a separate fast model checks it after every turn until it's met. This repo ships the same underlying primitives as short, readable [hooks](https://code.claude.com/docs/en/hooks) and a [subagent](https://code.claude.com/docs/en/sub-agents), so you can see how each mechanism works and assemble a harness tuned to your project. The patterns come from [Effective Harnesses for Long-Running Agents](https://www.anthropic.com/engineering/effective-harnesses-for-long-running-agents) (Nov 2025) and [Harness Design for Long-Running Application Development](https://www.anthropic.com/engineering/harness-design-long-running-apps) (Mar 2026). We recommend trying both the in-product features and a custom harness to see which fits your workflow.

In-product Custom harness (this repo)
What runs the loop `/goal` the primitives below + a loop you write
Who judges "done" a separate fast model checking your condition your `agents/evaluator.md` with your prompt
Where it works Claude Code interactive, `-p`, Remote Control Claude Code, headless, or Agent SDK

Three primitives form the quality loop:

  • Default-FAIL contract. Every criterion starts false; the agent can't mark it passing without opening evidence first.
  • Fresh-context evaluator. A separate agent with no Write/Edit tools grades the work from a context window that never saw the build.
  • Agent-maintained handoff. The agent writes its own progress notes and commits to git so the next session picks up cleanly.

Two more opera