Harness Primitives for Long-Running Claude Agents · Anthropic (github.com/anthropics) · built for the Long-Running Agents station at Code with Claude 2026
Anthropic ships runnable reference harness code
The repository supplies three small, standalone hooks: a default-FAIL contract that blocks an agent from marking a results file "passing" until it has opened evidence, a screenshot or console log; a fresh-context evaluator subagent, with no Write or Edit tools, that grades a diff from a context window that never saw the build; and an agent-maintained handoff where the agent writes its own progress notes and commits at checkpoints so a fresh session picks up cleanly. The verify-gate hook is candid about its limits in its own comments: it guards Write and Edit calls, while a shell command can still rewrite the results file directly. Reading any evidence also unlocks every result row rather than the row it supports.
Why it matters: This is the same shape this lane has been calling the phantom-guardrail countermeasure and the fresh-context evaluator, now published as Anthropic's own copy-pasteable code. Someone assembling a harness this week can drop these files in and watch the enforcement work.