Running agents over hours and many sessions
For engineers
Harnesses, progress files, checkpoints and context resets that keep an agent on track across hours of work
110 questions across four stages: Understand, Apply, Solve and Judge.
Try 5 questions
Practice items, not counted towards your mastery. No account needed.
Check yourself · 1 of 5
What should the first session of a multi-session agent job do?
Check yourself · 2 of 5
Why does a long agent job keep its plan in files instead of the chat?
Check yourself · 3 of 5
When should an agent commit during a long task?
Check yourself · 4 of 5
What is compaction in a long agent session?
Check yourself · 5 of 5
Which reading shows that a long job is still running?
Topics
- Harness structure for multi-session agents4 min read · A first session that sets up the environment, then sessions that each finish one piece of work and leave a clean state
- Progress files and feature lists as agent memory4 min read · Structured feature lists with pass or fail status, progress notes and the git log as the memory a fresh session reads
- Checkpoints, commits and resuming after a crash4 min read · Committing after each step, rewinding bad changes and resuming a session that stopped half way
- Context resets and compaction over long runs4 min read · When to compact a session, when to restart with a handoff note, and how goals drift over many hours
- Watchdogs for unattended long agent jobs4 min read · Telling running, queued and stalled jobs apart from logs, CPU time and output, and stopping only your own processes
Start here
- Effective harnesses for long-running agents (Anthropic) (opens in a new tab)ArticleFree
Describes the initializer session, feature list, progress file and one-feature-per-session pattern this skill teaches.
- Effective context engineering for AI agents (Anthropic) (opens in a new tab)ArticleFree
Covers compaction, structured note-taking and sub-agent hand-offs for tasks that outgrow the context window.
- Checkpointing (Claude Code docs) (opens in a new tab)DocsFree
Explains how Claude Code snapshots edits, rewinds code and conversation, and what checkpoints do not cover.
Helps to know first
110 questions · last verified 2026-12