longgraph
Long-horizon agent skill for Claude Code, Cursor, Codex & Grok Build.
Stop agent drift with a durable ledger, a clean-context supervisor, and verified gates.
Queue many long tasks in one loop — even unrelated ones — and keep going after a host switch
by re-sending the same prompt against the files.
Design once → compile a durable loop-graph → verify all the way to done.

English · 简体中文
longgraph (longgraph-skill) is a curated agent skill and cross-host
prompt library for long-running / long-horizon agent work — multi-hour
coding, multi-milestone migrations, a queue of long tasks in one loop (they
need not be related), and anything that outlives one context window. It is
graph engineering for agents: specialized roles (executor · supervisor ·
scout) connected through durable, inspectable files — not another orchestration
runtime. Because the scoreboard lives on disk, you can change hosts mid-run:
open the same workspace, re-send the frozen node prompt, and continue.
One durable graph, portable across hosts. For a simple self-contained goal,
use the host's normal task or goal directly; longgraph starts where durable graph
structure adds value.
Evidence
These are not one-shot demos. longgraph is a Markdown skill / prompt library
(not an orchestration runtime). The table mixes checkable public Git, a
function-only redacted multi-day pattern, and synthetic pedagogy.
| Case | What a reader can verify | Kind |
|---|
| Self-iteration of this skill | 87 public commits across ~14 calendar days (2026-07-19 → 2026-08-02), 74 files, method rules written back into the library (no wake edge, gate-wait backlog, blocked≠parked, bounded live edges, authoring≠runtime) | Public Git facts — fixed anchor 6efcb7f |
| Multi-day control-plane pattern | Multi-day wall-clock, tens of rounds, many directives: durable ledger, clean-context supervisor overturns self-reported evidence, non-skippable gates, blocked-work lane, owner A/B/C — functions only, no private payload | Redacted real-run pattern |
| migrate-blob-storage | Multi-milestone ledger: pilot → cohort, forced convergence, supervisor overturns self-reported evidence, non-skippable gate + blocked-work lane | Synthetic pedagogy (fictional app) |
| add-tests-to-cli | Smallest full run: three rounds, register-then-defer, clean-context supervisor intent | Synthetic pedagogy (fictional CLI) |
How to read the clock. The self-iteration window’s ~14 days / ~340 hours is
project wall-clock (first public commit → frozen anchor), not continuous model
execution and not a claim of unattended production autonomy. Re-check Git with the
commands in the self-iteration case.
The redacted multi-day card uses coarse buckets only and is not private-Git
re-checkable — see its evidence boundary.
Publication rules for future cases:
public / private boundary.
When to use this
Reach for longgraph when you need any of:
- A long-horizon agent that keeps working after context compaction / session resets
- A durable task ledger (single scoreboard) instead of chat-memory progress
- Several long tasks in one loop — a continuous queue, even when items are unrelated
- Host-portable continuity — switch Claude Code ↔ Cursor ↔ Codex ↔ Grok Build mid-run by re-sending the prompt against the same files
- An independent clean-context supervisor — not the same agent grading itself
- Verified done: acceptance gates re-run against real output, not self-reported “done”
- Multi-milestone work with non-skippable gates and explicit owner red lines
- A Markdown skill / prompt library that works across Claude Code · Cursor · Codex · Grok Build