[FEATURE] Long Task Mode

Resolved 💬 6 comments Opened Sep 27, 2025 by simplexforce Closed Jan 9, 2026

Preflight Checklist

  • [x] I have searched existing requests and this feature hasn't been requested yet
  • [x] This is a single feature request (not multiple features)

Problem Statement

Current Claude Code workflow faces interruptions when AI agents encounter operations that require user confirmation, particularly during extended periods of automated coding sessions. This disrupts workflow continuity when users are temporarily unavailable (e.g., meals, breaks, overnight sessions).

While the auto-accept edits feature helps with common operations, it cannot anticipate all operations required by new plans. Even with extensive auto-accept configurations, unexpected operations in each new plan can still cause interruptions, preventing true long-term autonomous execution.

Proposed Solution

Proposed Solution: Long Task Mode

Long Task Mode enables uninterrupted AI agent execution through dynamic operation whitelists and deferred question handling. This addresses the limitations of current auto-accept features by providing a comprehensive framework for long-term autonomous AI agent execution. AI agents analyze plans and project contexts to predict required operations, allowing users to pre-approve safe operations while maintaining control over high-risk actions.

Key Features

  1. Dynamic Operation Whitelist
  • AI agent analyzes plan and project context to predict required operations
  • Users review and modify proposed operation categories before execution
  • Operations categorized by risk level (Safe/Moderate/High-risk)
  • Visual interface with safety warnings for high-risk operations
  1. Interrupt Avoidance & Question Batching
  • AI agents avoid operations outside the approved whitelist
  • Non-critical questions accumulated for consolidated review
  • Graceful degradation when user input is unavoidable
  • Consolidated question report presented upon completion
  1. Extended Autonomous Execution
  • Uninterrupted coding sessions during user absence
  • Support for overnight and extended coding capabilities
  • Comprehensive operation tracking and safety controls

Implementation Workflow

User Request → Plan Mode → Long Task Mode Activation → AI Agent Analyzes Plan & Context
     ↓
Dynamic Whitelist Generation → Whitelist Review → Confirmation
     ↓
AI Agent Execution (within whitelist) → Question Accumulation → Task Completion
     ↓
Batched Question Review → User Response → Final Adjustments

Operation Categories

Note: The specific whitelist should be dynamically generated by the AI agent based on plan analysis and project context.

  • Safe Operations: File searches, code reading, testing, formatting
  • Moderate Operations: Git status/diff, file creation/editing, dependency management
  • High-risk Operations: Git commits, file deletion, system commands (always require approval)

Safety & User Experience

  • Safety Controls: Time limits, user interruption capability, operation tracking, loop detection
  • User Interface: Interactive whitelist review, progress monitoring, completion reports

Loop detection prevents infinite loops by monitoring operation patterns and resource consumption, automatically pausing execution when repetitive or resource-intensive patterns are detected.

Benefits

  • Extended Productivity: Uninterrupted coding sessions during user absence
  • Better Resource Utilization: Overnight and extended coding capabilities
  • Reduced Interruptions: Consolidated question handling and operation whitelisting
  • Enhanced Safety: Controlled permissions with user oversight

---

This proposal was developed through iterative conversations with Claude Code, demonstrating the very workflow improvements it aims to achieve.

Alternative Solutions

_No response_

Priority

High - Significant impact on productivity

Feature Category

Interactive mode (TUI)

Use Case Example

Example Scenarios:

Long Task Mode enables users to maximize productivity during periods of unavailability:

  • Meal Times: Start a complex refactoring task before lunch, return to find it completed
  • Evening Sessions: Begin implementing a new feature before dinner, review progress after
  • Overnight Work: Launch extensive testing or documentation generation before sleep
  • Extended Absences: Initiate multi-hour code analysis or migration tasks before leaving

In each scenario, the AI agent works autonomously within approved boundaries, accumulating non-critical questions for consolidated review upon user return.

Additional Context

_No response_

View original on GitHub ↗

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