Skip to content
long-running-agent logo

Long-Running Agent Framework

long-running-agent

Framework for building AI agents that work effectively across multiple context windows on complex, long-running tasks. Use when building agents for multi-hour/multi-day projects, implementing persistent coding workflows, creating systems that need state management across sessions, or when an agen...

SKILL.md

Full skill instructions

Long-Running Agent Framework

Framework for enabling AI agents to work effectively across many context windows on complex tasks.

Core Problem

Long-running agents must work in discrete sessions where each new session begins with no memory of previous work. Without proper scaffolding, agents tend to:

  1. One-shot attempts - Try to complete everything at once, running out of context mid-implementation
  2. Premature completion - See partial progress and declare the job done
  3. Undocumented states - Leave code in broken or undocumented states between sessions

Two-Agent Solution

1. Initializer Agent (First Session Only)

Sets up the environment with all context future agents need:

  • Create init.sh script for environment setup
  • Generate comprehensive feature_list.json with all requirements
  • Initialize claude-progress.txt for session logging
  • Make initial git commit

See references/​initializer-prompt.md for the full prompt template.

2. Coding Agent (Every Subsequent Session)

Makes incremental progress while maintaining clean state:

  • Read progress files and git logs to get bearings
  • Run basic tests to verify working state
  • Work on ONE feature at a time
  • Test end-to-end before marking complete
  • Commit progress with descriptive messages
  • Update progress file

See references/​coding-prompt.md for the full prompt template.

Session Startup Sequence

Every coding agent session should begin:

1. pwd                              # Understand working directory
2. cat claude-progress.txt          # Read recent progress
3. cat feature_list.json            # Check feature status
4. git log --oneline -20            # Review recent commits
5. ./​init.sh                        # Start dev environment
6. <run basic test>                 # Verify app works
7. <select next feature>            # Choose one failing feature

Key Files

feature_list.json

Comprehensive list of all features with pass/​fail status. Use JSON format to prevent inappropriate edits.

{
  "features": [
    {
      "category": "functional",
      "description": "User can create new chat",
      "steps": ["Navigate to main", "Click New Chat", "Verify creation"],
      "passes": false
    }
  ]
}

Template: assets/​feature_list_template.json

claude-progress.txt

Session-by-session log of work completed. Each entry includes:

  • Session timestamp
  • Features worked on
  • Changes made
  • Current state
  • Next steps

Template: assets/​progress_template.md

init.sh

Environment setup script that:

  • Installs dependencies
  • Starts development servers
  • Sets up any required services

Critical Rules

For Feature List

  • Never remove or edit test descriptions
  • Only change passes field status
  • Mark as passing ONLY after end-to-end verification

For Progress Tracking

  • Always commit before session end
  • Write descriptive commit messages
  • Update progress file with summary
  • Leave environment in mergeable state

For Testing

  • Use browser automation for web apps (Puppeteer MCP)
  • Test as a human user would
  • Verify end-to-end, not just unit tests
  • Document any known limitations

Common Failure Modes & Solutions

ProblemSolution
Agent one-shots entire projectCreate detailed feature list, work one at a time
Declares victory too earlyCheck feature_list.json for failing tests
Leaves broken stateRun basic test at session start, fix first
Marks features done prematurelyRequire end-to-end browser testing
Wastes time figuring out setupRead init.sh, use established patterns

Adapting to Other Domains

This framework generalizes beyond web development. Key principles:

  1. Comprehensive task decomposition - Break work into testable units
  2. Progress persistence - Maintain state across sessions
  3. Incremental verification - Test after each change
  4. Clean handoffs - Leave work in resumable state

More skills from majiayu000

xiaohongshu logo
majiayu000/claude-arsenal

xiaohongshu

xiaohongshu

286 148
View
agent-task-conductor logo
majiayu000/claude-skill-registry

agent-task-conductor

Conduct multi-agent task orchestration and workflow coordination.

663 1
View
conductor-setup logo
majiayu000/claude-skill-registry

conductor-setup

Initialize project with Conductor artifacts (product definition,

663 1
View
animation-designer logo
majiayu000/claude-skill-registry

animation-designer

Expert in web animations, transitions, and motion design using Framer Motion and CSS

663 1
View
diagramming logo
majiayu000/claude-skill-registry

diagramming

Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...

663 1
View
h3-pg logo
majiayu000/claude-skill-registry-data

h3-pg

PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.

23 1
View
conductor-development logo
majiayu000/claude-skill-registry

conductor-development

Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...

663 1
View
conductor-status logo
majiayu000/claude-skill-registry

conductor-status

Display project status, active tracks, and next actions

663 1
View
dockerization logo
majiayu000/claude-skill-registry

dockerization

Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.

663 1
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View