Claude Code crashes on Laravel project - persists even with 100 files visible

Resolved 💬 5 comments Opened Nov 3, 2025 by Jasonzombie Closed Jan 12, 2026

Claude Code Extension Crashes on Large Laravel Project - Persists Even with 100 Files

Summary

Claude Code extension causes persistent "extension host terminated unexpectedly" error on a Laravel + Playwright project. Issue persists even with ultra-aggressive file exclusions (100 files visible).

Environment

  • OS: macOS Darwin 24.6.0
  • VS Code Version: Latest (as of 2025-11-03)
  • Claude Code Version: 2.0.31-darwin-arm64
  • Project: Laravel 12 (PHP) + Playwright (TypeScript)

Severity

CRITICAL - Extension completely unusable on this project, even with minimal file visibility.

Reproduction Steps

Initial State

  • Laravel project with 2,717 TypeScript/JavaScript files
  • 52 Playwright test files
  • 255 Laravel PHP files
  • Large vendor dependencies

What We Tried

1. Fixed All Dependencies
  • ✅ Installed missing npm packages (pngjs, pixelmatch, typescript, @types/node, dotenv)
  • ✅ Created tsconfig.json
  • ✅ Updated all packages to latest versions
  • Result: Still crashes
2. Disabled All Other Extensions
  • ✅ Tested with ZERO other extensions active
  • ✅ Isolated Claude Code as the ONLY active extension
  • Result: Still crashes
3. Cleared All VS Code Cache
  • ✅ Cleared workspace storage
  • ✅ Cleared cache directories
  • ✅ Cleared cached data
  • ✅ Fresh workspace state
  • Result: Still crashes
4. Disabled TypeScript/JavaScript Language Services
{
  "typescript.validate.enable": false,
  "javascript.validate.enable": false,
  "typescript.tsserver.maxTsServerMemory": 8192
}
  • Result: Still crashes
5. Aggressive File Exclusions (Reduced to ~300 files)

Excluded:

  • All test directories
  • All node_modules and vendor
  • All public and storage files
  • All TypeScript/JavaScript test files
  • Result: Still crashes
6. ULTRA-MINIMAL File Exclusions (Reduced to ~100 files)

Only showed app/Http/ directory with ~100 PHP files. Everything else hidden:

{
  "files.exclude": {
    "**/tests/**": true,
    "**/node_modules": true,
    "**/vendor": true,
    "**/public/**": true,
    "**/storage/**": true,
    "resources": true,
    "config": true,
    "routes": true,
    "app/Models": true,
    "app/Console": true,
    "**/*.ts": true,
    "**/*.js": true,
    "**/*.json": true
  },
  "files.watcherExclude": {
    "**/*": true
  }
}
  • Visible files: Only 100 PHP files in app/Http/
  • Result: STILL CRASHES

Isolation Test Results

Systematic testing proved Claude Code is the culprit:

| Configuration | Result |
|--------------|--------|
| Zero extensions | ✅ No crash |
| + Intelephense (PHP) | ✅ No crash |
| + Laravel Blade | ✅ No crash |
| + GitHub Copilot + Chat | ✅ No crash |
| + Playwright Test | ✅ No crash |
| + Claude Code | ❌ CRASHES IMMEDIATELY |

All other extensions work perfectly. Only Claude Code causes the crash.

Error Message

The extension host terminated unexpectedly. Restarting...

This error appears within 30-60 seconds of loading Claude Code and loops continuously.

Expected Behavior

Claude Code should:

  • Handle projects with 100+ files without crashing
  • Implement proper file limits and lazy loading
  • Provide memory management for large projects
  • Gracefully degrade or show warning instead of crashing
  • Work alongside other extensions (Copilot works fine)

Actual Behavior

  • Extension host crashes immediately upon initialization
  • Crash persists even with only 100 files visible
  • Makes VS Code completely unstable
  • No error messages or logs to debug
  • Only solution is to disable Claude Code

Impact

  • Cannot use Claude Code on enterprise Laravel projects
  • Cannot use Claude Code on any project with 100+ files
  • Forces users to choose between VS Code stability and Claude Code
  • GitHub Copilot (competitor) works perfectly on same project

Workaround

Disable Claude Code extension entirely. No other workaround works.

Comparison with GitHub Copilot

Tested on the SAME project with ALL files visible:

  • ✅ GitHub Copilot: Works perfectly
  • ✅ GitHub Copilot Chat: Works perfectly
  • ❌ Claude Code: Crashes immediately

This proves the issue is specific to Claude Code's architecture.

System Configuration

VS Code Settings Applied:

{
  "typescript.validate.enable": false,
  "javascript.validate.enable": false,
  "typescript.tsserver.maxTsServerMemory": 8192,
  "files.watcherExclude": {
    "**/*": true
  }
}

Project Structure:

/Paythepoolman-Web
├── app/
│   ├── Http/ (100 PHP files - ONLY visible directory)
│   ├── Models/ (hidden)
│   ├── Console/ (hidden)
│   └── ...
├── tests/ (hidden)
├── node_modules/ (hidden)
├── vendor/ (hidden)
├── resources/ (hidden)
└── ...

Request for Fix

Please investigate why Claude Code:

  1. Crashes even with only 100 files
  2. Crashes when all file watching is disabled
  3. Cannot handle what other AI extensions (Copilot) handle easily
  4. Provides no error logging or debugging information

This makes Claude Code completely unusable for professional Laravel/enterprise development.

Additional Information

Testing Duration: 4+ hours of systematic troubleshooting
Files Created: Complete documentation of all attempts
Reproduced: 100% reproducible on this project
Workaround Success: None - only disabling extension works

Suggested Fixes

  1. Implement file count limits with user warning
  2. Add lazy loading / incremental indexing
  3. Improve memory management
  4. Add debug logging to identify crash cause
  5. Respect VS Code's files.exclude settings
  6. Add option to disable file indexing entirely
  7. Match GitHub Copilot's performance on large projects

Logs Available

User has complete documentation of all troubleshooting steps and can provide:

  • VS Code extension host logs
  • Project file structure
  • Complete VS Code settings
  • Step-by-step reproduction instructions

---

This is a critical bug preventing Claude Code adoption in enterprise environments.

Please prioritize this fix so Claude Code can compete with GitHub Copilot on real-world projects.

View original on GitHub ↗

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