Skip to content

Cannot Open Modified Files from Amazon Q Chat – “Editor Could Not Open” Error #8071

@suhail-edstem

Description

@suhail-edstem

Problem

I’m experiencing an issue with the Amazon Q extension in VS Code where I am unable to open modified files directly from the Amazon Q chat interface. When I click on a file that has been modified (e.g., through a code suggestion or diff), I get the following error:

"The editor could not be opened due to an unexpected error."

However, the same file can be opened manually through the Explorer or using the Command Palette, so the file path itself seems valid. The issue appears to be specific to Amazon Q's mechanism for opening the file.

This makes it difficult to quickly review or accept code changes suggested by the assistant.

Steps to reproduce the issue

Ask Amazon Q to suggest or modify code in a file.

In the Amazon Q chat panel, click on the modified file shown in the results.

Observe the error:

"The editor could not be opened due to an unexpected error."

Manually open the same file through VS Code Explorer – works fine.

Expected behavior

Clicking on a modified file from Amazon Q chat should open it in the editor without errors.

System details (run AWS: About and/or Amazon Q: About)

  • OS: Windows 11
  • Visual Studio Code version: 1.104.0
  • AWS Toolkit version: 3.74.0
  • Amazon Q version: 1.94.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugWe can reproduce the issue and confirmed it is a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions