microsoft / microsoft/vscode

Copilot Agent switched to unrelated nonexistent web-app task after large tool outputs

Open
#332,404 1 comment 0 reactions 1 assignee Claimed by @roblourens View on GitHub
Dominant language
TypeScript
Stars
193k
Forks
42.4k
PR merge metrics
PR metrics pending

Description

## Type

GitHub Copilot Chat Agent mode conversation-state failure.

## Environment

- VS Code Insiders: 1.135.0-insider
- VS Code commit: `0052619e71feb774a574b37f4f2ea20c36547373`
- GitHub Copilot extension: `0.63.2026082401`
- Model: GPT-5.6 Sol (`gpt-5.6-sol`)
- OS: Ubuntu 26.04 under WSL2
- Failure time: 2026-08-24 16:17:12 UTC
- Session ID: `9a7269b1-cb8c-4b6f-b903-e4fda0492cc9`
- Response ID: `ab049815-d91c-4afb-83fc-09eed6bc2881`

## Description

In a long-running Agent mode conversation, I asked Copilot to continue a source-code follow-up task. Copilot initially understood the request correctly, accepted the task, and loaded the applicable workflow instructions.

Immediately after four legitimate instruction-file tool results, Copilot abruptly claimed that an unrelated frontend application had already been implemented and tested:

> Implementation is in place and the focused tests passed. I’m opening the running app at desktop and mobile sizes now to verify the actual composition, spacing, interactions, and absence of overlap before I call it finished.

No frontend application existed, and I had never requested one. Copilot then attempted to open a nonexistent local preview server. After discovering that the project directory did not exist, it concluded that previously generated files had somehow been lost and proceeded to create a new React/Vite application named “Fellowship Circle.”

Image

Image

## Expected behavior

Copilot should have continued investigating and fixing the source-code issues from my current request.

At minimum, it should not claim that implementation, tests, files, or a running application exist without corresponding tool calls or filesystem evidence.

## Actual behavior

Copilot changed to an unrelated task that was absent from:

- My current request
- Prior visible user messages
- System prompts
- Custom instructions
- Tool outputs
- Other locally indexed Copilot sessions

It then performed filesystem writes, installed npm dependencies, started a local server, and visually tested the unrelated application.

## Sequence

1. I submitted a source-code follow-up request.
2. Copilot correctly acknowledged that request.
3. Copilot accepted and recorded the source-code task.
4. Copilot loaded four legitimate instruction files.
5. Without any intervening edit, build, test, or frontend-related request, Copilot claimed an unrelated web app had already been implemented and tested.
6. Copilot attempted to open a preview server for that nonexistent app.
7. After the path was missing, Copilot generated the app instead of recognizing that its prior assertion was false.

## Diagnostic evidence

The request immediately before the invalid response had:

- Input tokens: `366,763`
- Cached tokens: `341,074`
- Output tokens: `333`
- API: Responses API
- `hasPreviousResponseId: true`
- `truncation: disabled`
- Four incremental tool outputs with approximate serialized sizes:
- 88,234 characters
- 5,919 characters
- 4,177 characters
- 5,697 characters

The previous request had approximately `341,077` input tokens. The failure occurred directly after adding the four large tool outputs.

A search of all locally logged content before the invalid response found zero occurrences of:

- `Fellowship Circle`
- `fellowship-circle`
- `mutual aid`
- `Small acts, stronger circles`
- `responsive dashboard`

The invalid response was returned as a successful model response. It was not generated by a local tool or synthesized by the UI.

Because this was a stateful Responses API request, the local log contains only the incremental messages; the server-side state referenced by `previous_response_id` is opaque. I therefore cannot determine whether the root cause is model degradation at high context length, corrupted backend conversation state, or client orchestration around the stateful response chain.

## Reproducibility

Observed once in a very long Agent mode session. I do not currently have a deterministic minimal reproduction.

A likely stress condition is a long stateful conversation near 350k–370k input tokens followed by several large parallel tool outputs.

## Impact

Copilot performed unrelated autonomous actions based on nonexistent task state:

- Created an untracked project directory
- Installed npm packages
- Started a local development server
- Spent substantial time validating unrelated work

No commit, push, pull request, or modification to the intended source repository occurred.

## Security assessment

I found no evidence of prompt injection in the visible prompt, tool outputs, repository instructions, or other sessions. The generated application was subsequently audited and contained no confirmed security vulnerabilities.

However, treating nonexistent prior actions as established state is concerning in Agent mode because it can cause arbitrary filesystem, package-manager, process, or provider actions unless caught by the user or sandbox.

## Logs

I have the complete Copilot debug log and transcript for this session. They contain private repository and code-review information, so I cannot attach them publicly without redaction. I can provide the relevant full logs privately to the Copilot/VS Code team using the session ID and response ID above.

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.