Feature request: autonomous plan execution with self-healing agent teams

Resolved 💬 3 comments Opened Apr 17, 2026 by MichaelArnoldOwens Closed May 25, 2026

Problem

When executing a multi-step plan, the user often needs to babysit the process — approving actions, unblocking errors, and making judgment calls at each failure point. This makes it impossible to kick off a plan before going to sleep or stepping away for hours, even when the plan is well-defined and written to a file.

Today, if a plan step fails (type error, test failure, ambiguous requirement), the agent either stops and waits for user input or makes a single attempt to fix it. There's no structured escalation or self-healing loop.

Proposed Solution

Add an autonomous plan execution mode that:

  1. Executes a plan file end-to-end without user intervention — works through each step sequentially, committing progress as it goes
  2. Self-heals on failures — when a step fails (build error, test failure, lint issue), spawns a sub-agent team to:
  • Investigate the root cause
  • Propose solutions
  • Validate the fix (typecheck, tests, lint)
  • Apply the fix and continue with the remaining plan
  1. Handles hard blockers gracefully — if a problem can't be resolved after N attempts:
  • Applies the best available mitigation (e.g., skip with a TODO, partial implementation)
  • Logs a detailed note of what failed, what was tried, and what's needed
  • Continues executing the remaining plan steps that aren't blocked
  1. Produces a morning summary — when the user returns, provides a structured report:
  • Steps completed successfully
  • Steps that required self-healing (what broke, how it was fixed)
  • Hard blockers encountered (what failed, what was tried, current state)
  • Remaining work or decisions that need human input

Example Workflow

User: Execute this plan autonomously — I'm going to sleep.
      Plan: docs/plans/video-capabilities-plan.md

Claude: Starting autonomous execution of 12-step plan...

[Step 1-4: completed successfully, committed]
[Step 5: type error — spawned investigation agent → found missing type export → fixed → committed]
[Step 7: test failure — spawned agent team → identified race condition → applied fix → tests pass → committed]  
[Step 9: hard blocker — API endpoint doesn't exist yet → added TODO stub + note → continued]
[Steps 10-12: completed successfully, committed]

--- Morning Summary ---
✅ 10/12 steps completed
🔧 2 steps required self-healing (auto-resolved)
🚫 1 hard blocker: Step 9 needs backend API (see TODO in src/api/videoCapabilities.ts)
📝 All changes committed on branch: 04-17-video-capabilities

Why This Matters

Many engineering workflows involve well-defined plans where 80-90% of steps are straightforward. The current model of stopping on every friction point wastes hours of potential overnight execution time. With structured self-healing and clear reporting, users can confidently start a plan before bed and review results in the morning — turning Claude Code into a true async teammate.

Related

  • #49861 — persistent plan visibility in UI (complements this by showing plan progress)

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗