[BUG] API Error 500 (Internal server error) in VS Code extension when launched from parent workspace directory

Resolved 💬 2 comments Opened Mar 17, 2026 by wkuszko Closed Apr 15, 2026

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?

Bug Report Description

Claude Code in VS Code consistently returns a 500 Internal Server Error when the workspace is opened from a parent directory containing two sibling repositories. The same extension works fine when opened from a subdirectory.

Error
API Error: 500 {"type":"error","error":{"type":"api_error","message":"Internal server
error"},"request_id":"req_011CZ9MJ8Yoea9U6Miop8w21"}

Expected Behavior

Claude Code should respond normally regardless of which directory VS Code is opened from.

Workaround

Opening VS Code from a subdirectory (e.g., C:\applications-spring6\applications\) works without issues.

Environment

  • OS: Windows 11 Pro 10.0.26200
  • IDE: VS Code with Claude Code extension
  • Workspace structure: Parent directory with two sibling repos (core/, applications/), each with their own CLAUDE.md. Parent directory also has a root CLAUDE.md. Parent directory is not itself a git repository.
  • CLAUDE.md files: Small (53, 118, and 94 lines respectively)
  • Auto-memory files: Minimal (2 small files)

Additional Context

  • The configuration was working fine before. The error suddenly occurred after simple prompt in the middle of a chat and continues to reproduce.
  • The error occurs on every message in a fresh chat — it is not transient.
  • The CLI version of Claude Code from the same root directory does work (same model, same context files). It produced this bug report for me.
  • This suggests the issue is specific to how the VS Code extension packages or sends context from a non-git parent directory containing multiple repos.

What Should Happen?

Claude Code should respond normally regardless of which directory VS Code is opened from.

Error Messages/Logs

API Error: 500 {"type":"error","error":{"type":"api_error","message":"Internal server
  error"},"request_id":"req_011CZ9MJ8Yoea9U6Miop8w21"}

Steps to Reproduce

Steps to Reproduce

  1. Open VS Code in a parent directory that contains two sibling Git repositories (e.g., C:\applications-spring6\ containing core/ and applications/ subdirectories)
  2. Open Claude Code chat in VS Code
  3. Send any message — it starts to process it and after some time returns 500 error
  4. The error persists across new chats, and after closing and reopening VS Code

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.1.77 (Claude Code)

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

VS Code integrated terminal

Additional Information

<img width="702" height="679" alt="Image" src="https://github.com/user-attachments/assets/a30ad5ac-8c01-4730-bcb5-aeee376816ca" />

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗