---
schema_version: "1"
id: bf4b2b8501b17079003d450a03c9bd74b85562f981fa3d8d79cf6e206ba762d6
title: Plan Mode
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/salesforcedx/agentforcevibes/guides/files/afv-plan-mode.md
canonical_url: https://developer.salesforce.com/docs/platform/agentforcevibes/guide/afv-plan-mode.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 169feee02068551d93cdc94cf6200a0c3f527b96f9002220db195178b3bedcb4
products:
  - Agentforce Vibes Developer Guide
  - salesforcedx
---
# Plan Mode

Plan Mode tells Agentforce Vibes to map out multi-step work as a structured plan before executing anything. With Plan Mode off, the agent responds directly to your prompt—answering questions, generating code, or making changes based on what you ask. With Plan Mode on, the agent produces a structured plan for your approval. Once you approve, the mode switches to Agent mode and execution begins.

## Enable Plan Mode

Click the **Plan** button in the bottom bar of the Chat interface, next to the model selector. When Plan Mode is active, the button is highlighted and the input bar shows **Disable plan mode**.

To turn off Plan Mode, click **Disable plan mode** in the input bar or click the **Plan** button again.

## Suggested Plan Prompts

When you open a new Chat session, the Chat tab shows example prompts grouped by type. The **PLAN** section lists ready-to-use examples for common multi-step tasks:

- Add a validation rule, then deploy to sandbox
- Build and deploy a change set across Orgs
- Migrate metadata between two sandboxes

Click any suggestion to start a plan with that prompt pre-filled. You can also type your own prompt directly.

## How Plan Mode Works

1. Describe what you want to accomplish (for example, "Add a validation rule, then deploy to sandbox").
2. The agent analyzes your request, identifies the steps involved, and maps dependencies.
3. The agent may ask clarifying questions about scope before producing the plan.
4. The agent presents a structured plan with Context, Goals, Non-Goals, Approach, and numbered Tasks.
5. Review the plan and iterate—go back and forth with the agent until the scope is correct. The agent edits the plan based on your feedback.
6. Click **Approve Plan**. The mode switches to Agent mode and the plan executes.

## Anatomy of a Plan

A plan includes these sections:

- **Context**—a summary of what you asked for.
- **Goals**—what the plan aims to achieve.
- **Non-Goals**—what the plan explicitly doesn't touch.
- **Approach**—the number of tasks and their overall strategy (for example, "3 tasks—read only, no metadata is written or deployed"). Describes the specialized subagent roles assigned, such as Logic Builder for Apex services, Component Builder for LWC, and QA Validator for test coverage.
- **Tasks**—numbered steps with descriptions, expected outcomes, and relevant file paths.

## Agent-Suggested Plans

You don't have to enable Plan Mode before prompting. If you submit a complex request without Plan Mode on, the agent can recognize that a structured approach makes sense and suggest creating a plan. You can accept the suggestion and the agent switches into Plan Mode automatically.

## When to Use Plan Mode

- Multi-step changes that span multiple files or require a specific order of operations.
- Deployments that need a pre-deployment validation pass.
- Metadata migrations between Orgs.
- Any task where you want to see and approve the approach before the agent starts changing files.

## Considerations

- Plan Mode consumes context while building the plan. For large tasks, consider breaking work into smaller scoped requests.
- You can toggle Plan Mode on or off at any time during a session.
- The plan references your current project state. If you make manual changes between approval and execution, the plan may need adjustment.
- To change the scope or approach after reviewing the plan, give feedback in chat rather than approving—the agent updates the plan before you commit.

## See Also

- [Chat Interface](https://developer.salesforce.com/docs/platform/agentforcevibes/guide/afv-chat-interface.md)
- [Workflow Patterns](https://developer.salesforce.com/docs/platform/agentforcevibes/guide/afv-workflow-patterns.md)
