is now available! Read about the new features and fixes from September.

Planning in VS Code chat

Agents in Visual Studio Code chat help you execute complex coding tasks autonomously. The plan agent enables you to create detailed implementation plans before starting the implementation to ensure all requirements are met. With todo lists, the agent can ensure it stays focused on the overall goals and tracks progress effectively.

Using plans and todos let you structure and review details of the implementation with the agent before coding starts, improving the quality and reliability of the generated code. The plan and todos also provide better guidance to the agent to work through more complex and longer tasks in a systematic way.

This article explains how to research and plan development tasks in VS Code chat, including the plan agent and todo lists.

Note

The plan agent is currently only available in VS Code Insiders.

Plan agent for detailed task research

The built-in plan agent collaborates with you to create detailed implementation plans before executing them. This ensures that all requirements are considered and addressed before any code changes are made. The plan agent does not make any code changes until the plan is reviewed and approved by you. Once approved, you can hand off the plan to the default agent or save the plan for further refinement, review, or team discussions.

The plan agent is designed to:

  • Research the task comprehensively using read-only tools and codebase analysis to identify requirements and constraints
  • Break down the task into manageable, actionable steps and include open questions to ambiguous requirements
  • Present a concise plan draft, based on a standardized plan format, for user review and iteration

How to plan a task

  1. Open the Chat view by pressing ⌃⌘I (Windows, Linux Ctrl+Alt+I) and select Plan from the agents dropdown.

  2. Enter a high-level task (feature, refacoring, bug, etc.) and submit it.

    For example:

    • "Implement a user authentication system with OAuth2 and JWT"
    • "Add unit tests for all API endpoints"
    • "Save doesn't reset the form fields after submission"
  3. Preview the proposed plan draft and provide feedback for iteration.

    The plan agent provides a high-level summary and a breakdown of steps, including any open questions for clarification.

    Screenshot showing a sample plan generated by the plan agent in the Chat view, including a summary, breakdown of steps, and open questions.

    Tip

    Stay in plan mode to refine your plan before implementation. You can iterate multiple times to clarify requirements, adjust scope, or address open questions. This ensures a solid foundation before any code changes are made.

  4. Once finalized, choose to save the plan or hand off to an implementation agent to start coding by using the corresponding controls.

    When starting to implement the plan, you can still provide instructions, like "Start with the UI", or "only step 1 and 2". Similar for saving the plan, you can provide instructions like "Add a section for manual testing steps".

Track progress with the todo list

When working on complex tasks, VS Code's agent will create a todo list to track progress. The todo list breaks down your request into individual tasks and updates automatically as the AI completes each step. This helps you to monitor progress and allows the agent to stay focused during long-running tasks.

Tip

You can update the todo list using natural language like "revise step 1 to do x" or "add another task". If the agent's todos are not as expected, you can clear the list, but otherwise the agent manages the updates automatically based on your feedback and information it gathers while working on the request.