Skip to main content

Planning Mode

Planning Mode is a powerful feature that separates research and analysis from execution. Instead of immediately making changes, the AI first creates a detailed implementation plan that you can review, edit, and approve before any code is modified.

Why Use Planning Mode?

Safety

Review changes before they happen. No surprises.

Clarity

Understand the full scope of changes upfront.

Control

Edit and refine the plan before execution.

Efficiency

Catch issues early, before code is written.

Comparison Across Tools

FeatureCursorWindsurfClaude CodeGemini CLICodex
ActivationShift+TabToggle buttonShift+Tab (2x)Custom prompt/plan
Plan Storage.cursor/plans/~/.codeium/windsurf/brain/In-memoryGEMINI.mdSession
Read-Only Modeβœ…βœ…βœ…βœ…βœ…
Editable Plansβœ… Markdownβœ… Markdownβœ…βœ…βœ…
Todo Listsβœ…βœ…βœ…βœ…βœ…
Queued Messagesβœ…βœ…βŒβŒβŒ
AvailabilityAll plansPro/Teams/EnterpriseAllAllAll

Cursor Plan Mode

Cursor’s Plan Mode creates detailed implementation plans before writing any code. The agent researches your codebase, asks clarifying questions, and generates a reviewable plan.

How to Activate

Press Shift+Tab from the chat input to rotate to Plan Mode. Cursor also suggests it automatically for complex tasks.

How It Works

  1. Agent asks clarifying questions to understand your requirements
  2. Researches your codebase to gather relevant context
  3. Creates a comprehensive implementation plan
  4. You review and edit the plan through chat or markdown files
  5. Click to build the plan when ready

Plan Storage

Plans open as ephemeral virtual files. To save a plan to your workspace, click β€œSave to workspace” to store it in .cursor/plans/ for future reference, team sharing, and documentation.

Agent To-Dos

Cursor can break down longer tasks into manageable steps with dependencies:
  • Agent automatically creates to-do lists for complex tasks
  • Each item can have dependencies on other tasks
  • The list updates in real-time as work progresses
  • Completed tasks are marked off automatically

Queued Messages

Queue follow-up messages while Agent is working:
  1. While Agent is working, type your next instruction
  2. Press Ctrl+Enter to add it to the queue
  3. Messages appear in order below the active task
  4. Agent processes them sequentially after finishing

Windsurf Planning Mode

Windsurf’s Planning Mode uses persistent markdown files for long-term AI planning. A specialized planning agent continuously refines the plan while your selected model focuses on execution.

How to Activate

Click the Planning Mode toggle button below the Cascade input box. Planning Mode is enabled by default for Pro, Teams, and Enterprise users.

How It Works

  1. Enable Planning Mode via the toggle button
  2. Cascade creates a plan in a persistent markdown file
  3. Review and edit the plan directly or ask Cascade to update it
  4. Cascade executes based on the approved plan
  5. Plan updates automatically as new information (like Memories) is discovered

Plan Storage

Plans are saved in ~/.codeium/windsurf/brain/ directory, so they won’t be checked into your repository.

Plans and Todo Lists

Cascade has built-in planning capabilities:
  • A specialized planning agent continuously refines the long-term plan
  • Your selected model focuses on short-term actions based on that plan
  • Cascade creates a Todo list within the conversation to track progress
  • Ask Cascade to make updates to the Todo list as needed

Queued Messages

While waiting for Cascade to finish:
  • Type your message and press Enter to queue it
  • Press Enter again on an empty text box to send immediately
  • Delete any message from the queue before it’s sent

Claude Code Plan Mode

Claude Code’s Plan Mode separates research and analysis from execution, significantly improving safety. When activated, Claude will not edit files, run commands, or change anything until you approve the plan.

How to Activate

Press Shift+Tab twice to enter Plan Mode. Press Shift+Tab again to exit.

How It Works

  1. Activate Plan Mode with Shift+Tab twice
  2. Claude researches your codebase (read-only)
  3. Creates a structured plan with numbered steps
  4. You review and approve the plan
  5. Exit Plan Mode and Claude executes

Available Tools in Plan Mode

Allowed (Read-Only):
  • Read - Files and content viewing
  • LS - Directory listings
  • Glob - File pattern searches
  • Grep - Content searches
  • Task - Research agents
  • TodoRead/TodoWrite - Task management
  • WebFetch - Web content analysis
  • WebSearch - Web searches
  • NotebookRead - Jupyter notebooks
Restricted:
  • Edit/MultiEdit - File edits
  • Write - File creation
  • Bash - Command execution
  • NotebookEdit - Notebook edits
  • MCP tools that modify state

Opus 4.5 Plan Mode

Enhanced interactive planning with Claude Opus 4.5:
  1. You describe the task with requirements and context
  2. Claude asks clarifying questions about ambiguous requirements
  3. Claude creates plan.md with task breakdown and dependencies
  4. You review and edit the plan as needed
  5. Claude executes using Sonnet 4.5
Access via /model command: β€œUse Opus 4.5 in plan mode, Sonnet 4.5 otherwise”

Gemini CLI Plan Mode

Gemini CLI can operate in Plan Mode through custom instructions in your GEMINI.md file. This makes Gemini act like a senior engineer: understand the request, investigate the codebase, and present a clear plan for approval.

How to Activate

Add Plan Mode instructions to your GEMINI.md file:
# GEMINI.md

You are operating in Plan Mode. Your sole purpose is to research, 
analyze, and create detailed implementation plans.

## Core Principles
- Strictly Read-Only: Inspect files, navigate code, search the web
- No Modifications: Do not edit, create, or delete files
- No Commands: Do not run shell commands that make changes

## Steps
1. Acknowledge and analyze the user's request
2. Output your reasoning before the plan
3. Create a detailed, step-by-step implementation plan
4. Present for approval before any execution

Output Format

Your plan should include:
  1. Analysis: Findings and reasoning behind your strategy
  2. Plan: Numbered list of precise implementation steps
  3. Approval Request: Final step asking for user confirmation

Best Practices

  • Keep the plan focused and actionable
  • Include file paths and specific changes
  • Note dependencies between steps
  • Estimate complexity for each step

OpenAI Codex Plan Mode

Codex CLI includes a /plan slash command for creating implementation plans. It also supports approval modes that control how much Codex can do without confirmation.

How to Activate

Use the /plan slash command in the interactive session, or use the --approval flag when launching.

Approval Modes

ModeDescription
Auto (default)Read, edit, and run commands within working directory
Read OnlyBrowse files but won’t make changes until you approve
Full AccessWork across your machine without asking
Switch modes with /approvals inside an interactive session.

How It Works

  1. Launch Codex with codex command
  2. Use /plan to enter planning mode
  3. Codex explains its plan before making changes
  4. Approve or reject steps inline
  5. Review transcript of all actions

Resuming Plans

Codex stores transcripts locally for resuming:
# Resume most recent session
codex resume --last

# Resume specific session
codex resume <SESSION_ID>

# Resume with new instructions
codex exec resume --last "Implement the plan"

PraisonAI Planning Mode

PraisonAI Agents includes a comprehensive Planning Mode that creates detailed implementation plans before execution, similar to Cursor, Windsurf, and Claude Code.

Quick Start - Single Agent (Simplest) πŸ†•

Enable planning for any single agent with just one parameter:
from praisonaiagents import Agent

def search_web(query: str) -> str:
    return f"Search results for: {query}"

agent = Agent(
    name="AI Assistant",
    instructions="Research and write about topics",
    planning=True,              # Enable planning mode
    planning_tools=[search_web], # Tools for planning research
    planning_reasoning=True      # Chain-of-thought reasoning
)

result = agent.start("Research AI trends in 2025 and write a summary")
What happens:
  1. πŸ“‹ Agent creates a multi-step plan using PlanningAgent
  2. πŸš€ Executes each step sequentially
  3. πŸ“Š Shows progress with context passing between steps
  4. βœ… Returns final result

Quick Start - Multi-Agent

Enable planning with multiple agents:
from praisonaiagents import Agent, Task, PraisonAIAgents

researcher = Agent(name="Researcher", role="Research Analyst")
writer = Agent(name="Writer", role="Content Writer")

research_task = Task(description="Research AI benefits", agent=researcher)
write_task = Task(description="Write summary", agent=writer)

# Enable planning mode
agents = PraisonAIAgents(
    agents=[researcher, writer],
    tasks=[research_task, write_task],
    planning=True,              # Enable planning
    planning_tools=[search_web], # Tools for planning research
    planning_reasoning=True,     # Chain-of-thought reasoning
    auto_approve_plan=True       # Auto-approve plans
)

result = agents.start()

Advanced Usage - Manual Control

from praisonaiagents import Agent
from praisonaiagents.planning import PlanningAgent, Plan, PlanStep, TodoList

# Create a planning agent
planner = PlanningAgent(
    llm="gpt-4o-mini",
    read_only=True,  # Only read-only tools allowed
    verbose=1
)

# Create agents
researcher = Agent(name="Researcher", role="Research Analyst")
writer = Agent(name="Writer", role="Content Writer")

# Create a plan
plan = planner.create_plan_sync(
    request="Write an article about meditation benefits",
    agents=[researcher, writer],
    context="Keep it concise"
)

# Display the plan
print(plan.to_markdown())

# Create todo list from plan
todo_list = TodoList.from_plan(plan)
print(todo_list.to_markdown())

# Execute each todo item
for item in todo_list.items:
    todo_list.start(item.id)
    
    # Get appropriate agent
    agent = researcher if item.agent == "Researcher" else writer
    result = agent.chat(item.description)
    
    todo_list.complete(item.id)
    print(f"Progress: {todo_list.progress * 100:.0f}%")

Read-Only Mode for Agents

from praisonaiagents import Agent

# Agent in plan_mode can only use read-only tools
agent = Agent(
    name="Researcher",
    role="Research Analyst",
    plan_mode=True  # Restricts to read-only tools
)

# Only safe tools available: read_file, list_directory, search, etc.
# Blocked: write_file, execute_command, delete_file, etc.

Plan Storage

Plans are stored as markdown files in .praison/plans/:
from praisonaiagents.planning import PlanStorage, Plan, PlanStep

storage = PlanStorage()  # Uses .praison/ by default

# Save a plan
plan = Plan(
    name="Feature Implementation",
    description="Add user authentication",
    steps=[
        PlanStep(description="Research auth patterns", agent="Researcher"),
        PlanStep(description="Implement auth", agent="Developer", dependencies=["step_0"]),
        PlanStep(description="Write tests", agent="Tester", dependencies=["step_1"])
    ]
)
storage.save_plan(plan)

# Load a plan
loaded = storage.load_plan(plan.id)

# List all plans
plans = storage.list_plans()

Plan File Format

---
id: abc123
name: Feature Implementation
status: approved
created_at: '2024-01-15T10:00:00Z'
approved_at: '2024-01-15T10:05:00Z'
---

# Feature Implementation

Add user authentication to the application.

## Steps

1. ⬜ Research existing auth patterns
   - Agent: Researcher
   - Tools: read_file, search_codebase

2. ⬜ Implement authentication
   - Agent: Developer
   - Depends on: step_0

3. ⬜ Write comprehensive tests
   - Agent: Tester
   - Depends on: step_1

Approval Flow

from praisonaiagents.planning import ApprovalCallback, Plan

# Auto-approve all plans
callback = ApprovalCallback(auto_approve=True)

# Custom approval logic
def my_approval(plan):
    # Only approve plans with less than 5 steps
    return len(plan.steps) <= 5

callback = ApprovalCallback(approve_fn=my_approval)

# Interactive console approval
callback = ApprovalCallback(approve_fn=ApprovalCallback.console_approval)

Complete Example: Plan and Execute

from praisonaiagents import Agent, Task
from praisonaiagents.planning import PlanningAgent, TodoList

def main():
    # Create agents
    researcher = Agent(name="Researcher", role="Research Analyst", verbose=True)
    writer = Agent(name="Writer", role="Content Writer", verbose=True)
    
    # Create plan
    planner = PlanningAgent(llm="gpt-4o-mini")
    plan = planner.create_plan_sync(
        request="Write about AI in healthcare",
        agents=[researcher, writer]
    )
    
    print("πŸ“‹ Plan Created:")
    print(plan.to_markdown())
    
    # Create todo list
    todo = TodoList.from_plan(plan)
    
    # Execute each item
    agent_map = {"Researcher": researcher, "Writer": writer}
    
    for item in todo.items:
        print(f"\n⏳ Executing: {item.description}")
        todo.start(item.id)
        
        agent = agent_map.get(item.agent, researcher)
        result = agent.chat(item.description)
        
        todo.complete(item.id)
        print(f"βœ… Done! Progress: {todo.progress * 100:.0f}%")
    
    print("\nπŸŽ‰ All tasks completed!")

if __name__ == "__main__":
    main()

API Reference

ClassDescription
PlanningAgentCreates implementation plans using LLM
PlanRepresents an implementation plan with steps
PlanStepA single step in a plan
TodoListTrack progress through plan steps
TodoItemA single todo item
PlanStoragePersist plans to .praison/plans/
ApprovalCallbackHandle plan approval flow

Configuration Options

Agent Parameters (Single Agent Planning)

ParameterTypeDefaultDescription
planningboolFalseEnable planning mode
planning_toolsListNoneTools for planning research
planning_reasoningboolFalseEnable chain-of-thought reasoning
plan_modeboolFalseRead-only mode (restricts to safe tools)

PraisonAIAgents Parameters (Multi-Agent Planning)

ParameterTypeDefaultDescription
planningboolFalseEnable planning mode
planning_llmstr"gpt-4o-mini"LLM for planning
planning_toolsListNoneTools for planning research
planning_reasoningboolFalseEnable chain-of-thought reasoning
auto_approve_planboolFalseAuto-approve plans

Best Practices

Describe your end goal clearly. The AI creates more accurate plans when it understands the full scope.
Always review the generated plan. Check for missing steps, incorrect assumptions, or potential issues.
Don’t hesitate to ask for plan modifications. It’s cheaper to fix a plan than to fix code.
Planning mode shines for multi-step tasks. For simple changes, direct execution may be faster.
Save plans to your workspace for documentation, team sharing, and future reference.

See Also