/ide command fails in devcontainer: VS Code extension ignores $CLAUDE_CONFIG_DIR when writing lock files
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
The /ide command fails when running Claude Code CLI inside a devcontainer (Windows → WSL → Docker). The CLI cannot authenticate with the VS Code extension's MCP server.
Debug logs show:
MCP server "claude-vscode": SSE transport initialized, awaiting connection
MCP server "claude-vscode": Starting connection with timeout of 30000ms
MCP server "claude-vscode": No token data found
The extension starts the MCP server successfully (port visible via CLAUDE_CODE_SSE_PORT env var).
What Should Happen?
The CLI should be able to connect to the VS Code extension's MCP server and find in /ide vscode.
Error Messages/Logs
Claude VSCode log (Vscode->View->Output):
2025-12-14 01:15:30.736 [info] Claude code extension is now active?
2025-12-14 01:15:30.736 [info] MCP Server running on port 24314 (localhost only)
CLI log (using claude --debug):
2025-12-14T00:25:20.703Z [DEBUG] MCP server "claude-vscode": Connection failed after 30041ms: Connection to MCP server "claude-vscode" timed out after 30000ms
2025-12-14T00:25:20.703Z [ERROR] MCP server "claude-vscode" Connection failed: Connection to MCP server "claude-vscode" timed out after 30000ms
2025-12-14T00:25:20.727Z [DEBUG] MCP server "claude-vscode": No token data found
Steps to Reproduce
- Set up a VS Code devcontainer on Windows with WSL backend
- Install Claude Code CLI in the devcontainer (curl or npm)
- Install Claude Code VS Code extension
claude mcp add --transport sse claude-vscode "http://localhost:${CLAUDE_CODE_SSE_PORT}/sse"
Claude Model
Not sure / Multiple models
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
VSCode extensions 2.0.62 and CLI 2.0.69
Platform
Anthropic API
Operating System
Ubuntu/Debian Linux
Terminal/Shell
VS Code integrated terminal
Additional Information
I use WSL2. There I installed docker engine. The projects I work on uses devcontainers. So I connect into them. There I want to execute /ide in claude cli, however it does not find vscode. I saw in the logs also:
2025-12-14T00:25:18.115Z [DEBUG] [SLOW OPERATION DETECTED] execSyncWithDefaults (6.7ms): powershell.exe -Command '$env:USERPROFILE'
This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗