[Bug] Subagent with large context causes excessive memory consumption (40GB+) and process crash

Resolved 💬 3 comments Opened Jan 8, 2026 by Alex-bensimon Closed Jan 12, 2026

Bug Description
when I use claude code with subagent and large contexte it create a process named "2.1.1" that takes more than 40GB of RAM and make Claude Codde stop.

Environment Info

  • Platform: darwin
  • Terminal: cursor
  • Version: 2.1.1
  • Feedback ID: 1f037a14-bb0a-4c8b-882a-d150fdd68784

Errors

[{"error":"Error: Plugin MCP server error - mcp-config-invalid: MCP server github invalid: Missing environment variables: GITHUB_PERSONAL_ACCESS_TOKEN\n    at ROT (/$bunfs/root/claude:2125:23427)\n    at async <anonymous> (/$bunfs/root/claude:5074:878)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-01-08T15:31:11.963Z"},{"error":"Error: Plugin MCP server error - mcp-config-invalid: MCP server greptile invalid: Missing environment variables: GREPTILE_API_KEY\n    at ROT (/$bunfs/root/claude:2125:23427)\n    at async <anonymous> (/$bunfs/root/claude:5074:878)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-01-08T15:31:11.963Z"},{"error":"Error: NON-FATAL: Lock acquisition failed for /Users/alexbensimon/.local/share/claude/versions/2.1.1 (expected in multi-process scenarios)\n    at oXR (/$bunfs/root/claude:2994:2164)\n    at WKA (/$bunfs/root/claude:2994:1884)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-01-08T15:31:12.030Z"},{"error":"Error: LSP server plugin:typescript-lsp:typescript failed to start: Executable not found in $PATH: \"typescript-language-server\"\n    at start (/$bunfs/root/claude:2246:22305)\n    at async $ (/$bunfs/root/claude:2246:24757)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-01-08T15:31:12.052Z"},{"error":"Error: LSP server plugin:pyright-lsp:pyright failed to start: Executable not found in $PATH: \"pyright-langserver\"\n    at start (/$bunfs/root/claude:2246:22305)\n    at async $ (/$bunfs/root/claude:2246:24757)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-01-08T15:31:12.052Z"},{"error":"Error: Executable not found in $PATH: \"typescript-language-server\"\n    at spawn (unknown)\n    at spawn (node:child_process:667:35)\n    at spawn (node:child_process:14:39)\n    at start (/$bunfs/root/claude:2246:20850)\n    at start (/$bunfs/root/claude:2246:22359)\n    at $ (/$bunfs/root/claude:2246:24757)\n    at $ (/$bunfs/root/claude:2246:25732)\n    at _ (/$bunfs/root/claude:2246:32519)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-01-08T15:31:12.052Z"},{"error":"Error: Executable not found in $PATH: \"pyright-langserver\"\n    at spawn (unknown)\n    at spawn (node:child_process:667:35)\n    at spawn (node:child_process:14:39)\n    at start (/$bunfs/root/claude:2246:20850)\n    at start (/$bunfs/root/claude:2246:22359)\n    at $ (/$bunfs/root/claude:2246:24757)\n    at $ (/$bunfs/root/claude:2246:25732)\n    at _ (/$bunfs/root/claude:2246:32519)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-01-08T15:31:12.052Z"},{"error":"Error: Failed to start LSP server plugin:typescript-lsp:typescript: Executable not found in $PATH: \"typescript-language-server\"\n    at <anonymous> (/$bunfs/root/claude:2246:32541)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-01-08T15:31:12.052Z"},{"error":"Error: Failed to start LSP server plugin:pyright-lsp:pyright: Executable not found in $PATH: \"pyright-langserver\"\n    at <anonymous> (/$bunfs/root/claude:2246:32541)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-01-08T15:31:12.052Z"},{"error":"Error: Plugin MCP server error - mcp-config-invalid: MCP server github invalid: Missing environment variables: GITHUB_PERSONAL_ACCESS_TOKEN\n    at ROT (/$bunfs/root/claude:2125:23427)\n    at async W (/$bunfs/root/claude:2998:6838)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-01-08T15:31:13.209Z"},{"error":"Error: Plugin MCP server error - mcp-config-invalid: MCP server greptile invalid: Missing environment variables: GREPTILE_API_KEY\n    at ROT (/$bunfs/root/claude:2125:23427)\n    at async W (/$bunfs/root/claude:2998:6838)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-01-08T15:31:13.209Z"},{"error":"Error: Plugin MCP server error - mcp-config-invalid: MCP server github invalid: Missing environment variables: GITHUB_PERSONAL_ACCESS_TOKEN\n    at ROT (/$bunfs/root/claude:2125:23427)\n    at async J (/$bunfs/root/claude:2998:7354)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-01-08T15:31:13.209Z"},{"error":"Error: Plugin MCP server error - mcp-config-invalid: MCP server greptile invalid: Missing environment variables: GREPTILE_API_KEY\n    at ROT (/$bunfs/root/claude:2125:23427)\n    at async J (/$bunfs/root/claude:2998:7354)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-01-08T15:31:1

Note: Error logs were truncated.

View original on GitHub ↗

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