aws / aws/aws-toolkit-vscode

Amazon Q is not working with Remote Container in VSCode

Open
#8,672 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
TypeScript
Stars
2k
Forks
807
Avg merge
10h 12m
Merged PRs (30d)
7

Description

## Problem

The Amazon Q extension does not work when installed in a remote environment
The issue appears to be a compatibility limitation in the Amazon Q extension for VSCode devcontainer environments whereby a Language Server initialization failure occurs
The issue appears to affect recent Amazon Q extension versions (possibly all) later than 1.62.0 as downgrading to 1.62.0 resolves the issue
Github Copilot works without any issues

### Example of the error

2026-03-02 16:22:09.420 [info] Log level: info, beta=false
2026-03-02 16:22:09.420 [info] Telemetry product: Amazon Q For VS Code
2026-03-02 16:22:09.438 [info] proxyUtil: Using noProxy from VS Code settings:
2026-03-02 16:22:09.523 [info] current client registration id=
expires at Sun May 31 2026 15:59:19 GMT+0000 (Coordinated Universal Time)
key =
2026-03-02 16:22:09.523 [info] auth: Connection is valid:
2026-03-02 16:22:09.523 [info] auth: Updating connection state of to valid
2026-03-02 16:22:09.523 [info] codewhisperer: active connection changed
2026-03-02 16:22:09.523 [info] secondaryAuth: connectionId=, connectionStatus=valid
2026-03-02 16:22:09.523 [info] codewhisperer: connection states
connection isValid=true,
connection isValidCodewhispererCoreConnection=true,
connection isExpired=false,
secondaryAuth isExpired=false,
connection isUndefined=false
2026-03-02 16:22:09.636 [info] auth: Connection is valid:
2026-03-02 16:22:09.636 [info] auth: Updating connection state of to valid
2026-03-02 16:22:09.636 [info] codewhisperer: active connection changed
2026-03-02 16:22:09.854 [warning] AwsContext: no default region in credentials profile, falling back to us-east-1:
2026-03-02 16:22:10.182 [info] using amazonqLsp service configuration: default
2026-03-02 16:22:10.200 [info] using codewhispererService service configuration: default
2026-03-02 16:22:13.401 [info] lsp: Finished preparing "AmazonQ" LSP server: '/root/.cache/aws/toolkits/language-servers/AmazonQ/1.59.1'
2026-03-02 16:22:13.405 [info] AB Testing Cohort Assignments []
2026-03-02 16:22:13.900 [info] Command: (not started) [/root/.cache/aws/toolkits/language-servers/AmazonQ/1.59.1/servers/node --max-old-space-size=8196 /root/.cache/aws/toolkits/language-servers/AmazonQ/1.59.1/servers/aws-lsp-codewhisperer.js --nolazy --preserve-symlinks --stdio --pre-init-encryption --set-credentials-encryption-key]
2026-03-02 16:22:14.789 [info] node:fs:739
return binding.read(fd, buffer, offset, length, position);
^
Error: EISDIR: illegal operation on a directory, read
at Object.readSync (node:fs:739:18)
at tryReadSync (node:fs:416:20)
at readFileSync (node:fs:470:19)
at 75163 (/root/.cache/aws/toolkits/language-servers/AmazonQ/1.59.1/servers/aws-lsp-codewhisperer.js:5:556218)
at __webpack_require__ (/root/.cache/aws/toolkits/language-servers/AmazonQ/1.59.1/servers/aws-lsp-codewhisperer.js:8:1996)
at 71097 (/root/.cache/aws/toolkits/language-servers/AmazonQ/1.59.1/servers/aws-lsp-codewhisperer.js:5:277945)
at __webpack_require__ (/root/.cache/aws/toolkits/language-servers/AmazonQ/1.59.1/servers/aws-lsp-codewhisperer.js:8:1996)
at 92444 (/root/.cache/aws/toolkits/language-servers/AmazonQ/1.59.1/servers/aws-lsp-codewhisperer.js:5:1534865)
at __webpack_require__ (/root/.cache/aws/toolkits/language-servers/AmazonQ/1.59.1/servers/aws-lsp-codewhisperer.js:8:1996)
at 98570 (/root/.cache/aws/toolkits/language-servers/AmazonQ/1.59.1/servers/aws-lsp-codewhisperer.js:5:1837182) {
errno: -21,
code: 'EISDIR',
syscall: 'read'
}
2026-03-02 16:22:14.789 [info]
Node.js v24.9.0
2026-03-02 16:22:14.815 [info] [Error - 4:22:14 PM] Server initialization failed.
2026-03-02 16:22:14.815 [info] Message: Pending response rejected since connection got disposed

## Identified workaround

Downgrading the Amazon Q extension to version 1.62 (released on or around: 2025-04-25) solves the issue however in general this is not recommended because using an older version of any software carries risks including potential security vulnerabilities, etc.!

## Steps to reproduce the issue

Use a Linux (e.g. ubuntu) virtual machine/workstation
Install VSCode
Install the Amazon Q extension
Host development environment in a docker container
Use VSCode Remote Development to connect to the docker container
Follow these official guides for more information:
https://code.visualstudio.com/docs/remote/remote-overview https://code.visualstudio.com/docs/devcontainers/containers

## Expected behavior

Expect Amazon Q to work

## System details

- OS: Linux x64 5.15.0-171-generic
- Amazon Q Developer extension version: 1.112.0
- Visual Studio Code version: 1.107.0

Contributor guide

Open the contributing guide

Research direction

Reproduce the failure with VSCode Remote Development and a Docker devcontainer, then start from the AmazonQ LSP launch command and server path shown in the logs. Investigate why initialization reaches an EISDIR read error; done means the Amazon Q language server initializes successfully in the remote container without the failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, typescript, vscode
Domain
devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.