microsoft / microsoft/vscode

Plan Mode export wastes AI credits by invoking an agent to copy existing text into an editor tab

Open
#325,446 1 comment 1 reaction 1 assignee Claimed by @bhavyaus View on GitHub
bug chat-plan-agent
Dominant language
TypeScript
Stars
193k
Forks
42.4k
PR merge metrics
PR metrics pending

Description

## Description

After Plan Mode finishes generating an implementation plan, VS Code offers an action to open or export that plan into the editor.

Currently, this action appears to send a new chat prompt similar to:

```text
#createFile the plan as is into an untitled file
(untitled:plan-${camelCaseName}.prompt.md without frontmatter)
for further refinement.
```

This causes another full agent/model invocation merely to reproduce text that has already been generated and is already visible in the chat.

In my case, the planning session itself cost approximately $1.55 in AI usage, while the subsequent “Open in Editor” action cost approximately $0.45. In other words, copying the completed plan into an editor tab cost almost one-third as much as the entire planning process.

The exported text was effectively the same plan that had already been produced in the preceding response. No new analysis, workspace exploration, implementation work, or substantive transformation was requested.

Image

## Why this is problematic

Exporting the completed plan is not an unusual or advanced follow-up action. It is one of the most fundamental actions a user is likely to perform after Plan Mode finishes.

Invoking an expensive reasoning model again for what is functionally a copy-and-paste operation is extremely inefficient.

This is especially wasteful when the planning model is a high-cost model using a high reasoning setting. A user may deliberately pay for an expensive model to create the plan, but should not have to pay that model again simply to move the finished text from the chat pane into an editor tab.

## Steps to reproduce

1. Open a workspace in VS Code.
2. Start a Copilot Chat session in Plan Mode.
3. Select a paid model, particularly a higher-cost reasoning model.
4. Complete the planning process and allow the final plan to be displayed in chat.
5. Select the suggested action to open or export the plan into the editor.
6. Observe that VS Code sends a new `#createFile` agent prompt.
7. Check AI usage and observe that this action is billed as another model invocation.

## Actual behavior

VS Code starts another agent request and asks the model to create an untitled file containing the already-generated plan.

This consumes quite a bit of unnecessary additional tokens.

## Expected behavior

Moving an already-generated plan into the editor should be implemented as a local, deterministic VS Code operation and should not invoke a language model.

Ideally, the action should directly create an untitled editor document containing the exact plan text.

This should require no Copilot request and no AI-credit usage.

## Suggested resolution

Replace the current agent-powered `#createFile` handoff with a built-in local command that opens the completed plan in an untitled Markdown editor.

The agent-powered option could remain available separately for users who explicitly want the model to transform, refine, restructure, or otherwise modify the plan before creating the file.

The default export operation should not require the model to regenerate or repeat content that VS Code already has.

## Technical details

- VS Code Version: 1.128.0 (user setup)
- OS Version: Windows 11 Pro 25H2 x64 10.0.26200
- Feature: Plan mode
- Selected model: GPT 5.6 Sol ('very high' reasoning)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.