Skip to content

feat: add context checkpoint pattern to executing-plans - #1669

Closed
Edge4711 wants to merge 1 commit into
obra:mainfrom
Edge4711:feat/executing-plans-context-checkpoints
Closed

Edge4711 wants to merge 1 commit into
obra:mainfrom
Edge4711:feat/executing-plans-context-checkpoints

Conversation

@Edge4711

@Edge4711 Edge4711 commented Jun 1, 2026

Copy link
Copy Markdown

Problem

On long plans (5+ tasks), executing-plans accumulates tool output, file reads, and test results that consume context without benefiting future steps. The skill offered no mechanism to shed that weight mid-execution, and no durable progress record that would survive a /clear.

RED Baseline

Observed during a real 9-task plan execution (V5 security/code-quality hardening pass):

  • 9 sequential tasks, each with file edits + a full test run (~57 s output per run)
  • 23 files modified across app/, lib/, Test/, scripts/
  • Skill never offered a checkpoint; no [x] ticks written to the plan file
  • Context grew continuously from task 1 through task 9 with no release valve
  • User noted the gap directly: "Claude can often run out of context doing multiple steps — given that everything is documented in the plan, why doesn't this superpower clear context every now and again?"

The plan file already documents every step with complete before/after code, making it the natural resumption point — the skill just wasn't using it that way.

GREEN Fix

Two minimal additions to executing-plans/SKILL.md:

1. Checkbox ticking (Step 2, items 5–6)
After each task completes, tick [x] in the plan file immediately. This is the only progress record that survives a context clear and enables clean resumption.

2. Context Checkpoints section
Defines when to offer a checkpoint (5+ tasks completed, or heavy-output session), prescribes verbatim wording so the offer is consistent across instances, and specifies resume behaviour (read plan, skip [x]-marked tasks, announce resumption point).

The verbatim offer is intentional — prescribing the exact message prevents vague improvisation and gives users a reliable, actionable prompt every time.

Never offer after the final task — proceed directly to finishing-a-development-branch as before.

Scope

  • skills/executing-plans/SKILL.md only
  • No new files, no changes to other skills, no changes to hooks or config
  • Fully backwards-compatible: plans without [x] syntax execute identically; the checkpoint offer is additive

Testing Notes

The V5 session serves as the documented RED baseline. A formal subagent pressure test per writing-skills conventions would strengthen this further — happy to run one if that's preferred before merge.

Long plans accumulate tool output and test results that consume context
without benefiting future steps. Add two mechanisms:

1. Tick [x] in the plan file after each task — durable cross-session
   progress record that survives a /clear.

2. Offer a context checkpoint (verbatim prompt) after 5+ tasks or
   heavy-output sessions. On resume, skip [x]-marked tasks and announce
   the resumption point.

Based on a real 9-task session (V5 hardening pass) where context grew
continuously with no release valve across 23 file edits and 9 full test
runs (~57s output each).
@obra

obra commented Sep 26, 2026

Copy link
Copy Markdown
Owner

executing-plans was rebuilt in v6.4.1 (2b89c4c) as a first-class inline execution mode. Resume after context loss is now handled by the shared progress ledger. We are deliberately not adding check-in points between tasks (the skill lists "Let me check in before the next task" as a rationalization to avoid). The checkbox-ticking part is being decided together with #808, #2237 and #1075. Thanks @Edge4711!

— Claude Opus 5.5, Claude Code 2.1.283, session 49301b31-b716-41b8-a316-80b8461e0de9, on behalf of @obra

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skill:executing-plans The executing-plans skill

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants