[BUG] VS Code Extension memory leak in code-server - RAM grows unbounded with empty panel
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 Claude Code VS Code Extension (v2.1.11) running in code-server causes an unbounded memory leak. RAM consumption grows continuously to 13GB+ simply by opening an empty Claude Code panel in the sidebar – without entering any prompts or performing any tasks.
Critical observation: The Claude Code CLI (v2.1.12) on the same system remains completely stable and shows no memory leak. This strongly indicates the issue is isolated to the VS Code Extension, specifically in the code-server environment.
The leak appears to be independent of:
User input or active sessions
MCP server configurations
Configured hooks
Installed plugins
What Should Happen?
Opening the Claude Code panel should:
Initialize with minimal, stable memory footprint
Maintain constant RAM usage when idle
Only increase memory proportionally to actual task complexity
Release memory after task completion
Expected idle memory consumption: ~100-2000MB (similar to CLI behavior)
Error Messages/Logs
=== Environment ===
Claude CLI Version: 2.1.12 (Claude Code)
Extension Version: 2.1.11
code-server Version: 4.106.2 904942a1944f66a886b0ec5c0c60f312d559a6e6 with Code 1.106.2
PRETTY_NAME="Debian GNU/Linux 13 (trixie)"
Node.js: v20.20.0
Linux vscode 6.8.12-17-pve #1 SMP PREEMPT_DYNAMIC PMX 6.8.12-17 (2025-11-21T11:16Z) x86_64 GNU/Linux
=== Memory Status ===
total used free shared buff/cache available
Mem: 14Gi 1.3Gi 12Gi 140Ki 132Mi 12Gi
Swap: 0B 0B 0B
=== Top Memory Processes ===
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
codedev 15927 1.1 2.2 33659116 336492 ? Sl 11:38 0:12 /usr/lib/code-server/lib/node --dns-result-order=ipv4first /usr/lib/code-server/lib/vscode/out/bootstrap-fork --type=extensionHost --transformURIs --useHostProxy=false
codedev 5040 0.4 2.0 33628964 303412 ? Sl 08:51 0:47 /usr/lib/code-server/lib/node --dns-result-order=ipv4first /usr/lib/code-server/lib/vscode/out/bootstrap-fork --type=extensionHost --transformURIs --useHostProxy=false
codedev 5300 0.1 1.6 11991516 236100 ? Sl 08:52 0:22 /usr/lib/code-server/lib/node --use-system-ca /home/codedev/.local/share/code-server/extensions/gitlab.gitlab-workflow-6.64.1-universal/assets/language-server/main-bundle-node.js --stdio --clientProcessId=5040
codedev 16066 0.4 1.2 11930044 178360 ? Sl 11:38 0:04 /usr/lib/code-server/lib/node --use-system-ca /home/codedev/.local/share/code-server/extensions/gitlab.gitlab-workflow-6.64.1-universal/assets/language-server/main-bundle-node.js --stdio --clientProcessId=15927
codedev 318 0.4 0.7 11889592 116848 ? Sl 08:15 1:00 /usr/lib/code-server/lib/node /usr/lib/code-server/out/node/entry
codedev 16005 0.6 0.3 1393108 44620 ? Sl 11:38 0:06 /usr/lib/code-server/lib/node /usr/lib/code-server/lib/vscode/out/bootstrap-fork --type=fileWatcher
codedev 5091 0.1 0.2 1262124 43776 ? Sl 08:52 0:11 /usr/lib/code-server/lib/node /usr/lib/code-server/lib/vscode/out/bootstrap-fork --type=fileWatcher
codedev 1703 0.1 0.2 1127496 39884 ? Sl 08:17 0:15 /usr/lib/code-server/lib/node /usr/lib/code-server/lib/vscode/out/bootstrap-fork --type=ptyHost --logsPath /home/codedev/.local/share/code-server/logs/20260119T081516
codedev 85 0.0 0.1 1117104 22924 ? Ssl 08:15 0:00 /usr/lib/code-server/lib/node /usr/lib/code-server --config /home/codedev/.config/code-server/config.yaml
codedev 16161 0.2 0.1 1019068 19292 ? Sl 11:38 0:02 /usr/lib/code-server/lib/node /usr/lib/code-server/lib/vscode/extensions/markdown-language-features/dist/serverWorkerMain --node-ipc --clientProcessId=15927
codedev 19347 0.2 0.1 1016188 18992 ? Sl 11:39 0:02 /usr/lib/code-server/lib/node /usr/lib/code-server/lib/vscode/extensions/json-language-features/server/dist/node/jsonServerMain --node-ipc --clientProcessId=15927
root 1 0.0 0.0 23076 5596 ? Ss 08:15 0:09 /sbin/init
root 44 0.0 0.0 50972 5180 ? Ss 08:15 0:07 /usr/lib/systemd/systemd-journald
codedev 6388 0.0 0.0 6188 3968 pts/3 S 08:58 0:00 -bash
=== Extension Host Details ===
Extension Host PID: 5040
Name: node
Pid: 5040
VmPeak: 33788300 kB
VmSize: 33628964 kB
VmRSS: 303412 kB
VmData: 384888 kB
Threads: 13
Memory Mappings (top 10):
1069
9 /usr/lib/code-server/lib/node
8 anon_inode:[io_uring]
5 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.33
5 /usr/lib/x86_64-linux-gnu/libpthread.so.0
5 /usr/lib/x86_64-linux-gnu/libm.so.6
5 /usr/lib/x86_64-linux-gnu/libgcc_s.so.1
5 /usr/lib/x86_64-linux-gnu/libdl.so.2
5 /usr/lib/x86_64-linux-gnu/libc.so.6
5 /usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2
=== Claude Configuration ===
{
"permissions": {
"allow": [
"Bash(glab issue create:*)",
"Bash(glab label list:*)"
]
},
"hooks": {
"PostToolUse": [
{
"matcher": "Edit|Write",
"hooks": [
{
"type": "command",
"command": "~/.claude/hooks/docs-reminder.sh"
}
]
}
],
"Stop": [
{
"hooks": [
{
"type": "command",
"command": "~/.claude/hooks/docs-check.sh"
},
{
"type": "command",
"command": "~/.claude/hooks/auto-commit-push.sh"
}
]
}
]
},
"enabledPlugins": {
"document-skills@anthropic-agent-skills": true,
"example-skills@anthropic-agent-skills": true
}
}
=== Temp Files ===
Claude temp files count: 2
=== code-server Processes ===
codedev 85 0.0 0.1 1117104 22924 ? Ssl 08:15 0:00 /usr/lib/code-server/lib/node /usr/lib/code-server --config /home/codedev/.config/code-server/config.yaml
codedev 318 0.4 0.7 11889592 116848 ? Sl 08:15 1:00 /usr/lib/code-server/lib/node /usr/lib/code-server/out/node/entry
codedev 1703 0.1 0.2 1127496 39884 ? Sl 08:17 0:15 /usr/lib/code-server/lib/node /usr/lib/code-server/lib/vscode/out/bootstrap-fork --type=ptyHost --logsPath /home/codedev/.local/share/code-server/logs/20260119T081516
codedev 5040 0.4 2.0 33628964 303412 ? Sl 08:51 0:47 /usr/lib/code-server/lib/node --dns-result-order=ipv4first /usr/lib/code-server/lib/vscode/out/bootstrap-fork --type=extensionHost --transformURIs --useHostProxy=false
codedev 5091 0.1 0.2 1262124 43776 ? Sl 08:52 0:11 /usr/lib/code-server/lib/node /usr/lib/code-server/lib/vscode/out/bootstrap-fork --type=fileWatcher
codedev 5300 0.1 1.6 11991516 236100 ? Sl 08:52 0:22 /usr/lib/code-server/lib/node --use-system-ca /home/codedev/.local/share/code-server/extensions/gitlab.gitlab-workflow-6.64.1-universal/assets/language-server/main-bundle-node.js --stdio --clientProcessId=5040
codedev 15927 1.1 2.2 33659116 336492 ? Sl 11:38 0:12 /usr/lib/code-server/lib/node --dns-result-order=ipv4first /usr/lib/code-server/lib/vscode/out/bootstrap-fork --type=extensionHost --transformURIs --useHostProxy=false
codedev 16005 0.6 0.3 1393108 44620 ? Sl 11:38 0:06 /usr/lib/code-server/lib/node /usr/lib/code-server/lib/vscode/out/bootstrap-fork --type=fileWatcher
codedev 16066 0.4 1.2 11930044 178360 ? Sl 11:38 0:04 /usr/lib/code-server/lib/node --use-system-ca /home/codedev/.local/share/code-server/extensions/gitlab.gitlab-workflow-6.64.1-universal/assets/language-server/main-bundle-node.js --stdio --clientProcessId=15927
codedev 16161 0.2 0.1 1019068 19292 ? Sl 11:38 0:02 /usr/lib/code-server/lib/node /usr/lib/code-server/lib/vscode/extensions/markdown-language-features/dist/serverWorkerMain --node-ipc --clientProcessId=15927
codedev 19347 0.2 0.1 1016188 18992 ? Sl 11:39 0:02 /usr/lib/code-server/lib/node /usr/lib/code-server/lib/vscode/extensions/json-language-features/server/dist/node/jsonServerMain --node-ipc --clientProcessId=15927
Steps to Reproduce
- Install code-server on a Linux system
- Install Claude Code VS Code Extension (v2.1.11) in code-server
- Start code-server and open in browser
- Open the Claude Code panel via sidebar (Ctrl+Shift+P → "Claude Code: Open Panel" or click icon)
- Do not enter any prompts – leave the panel completely idle
- Monitor system memory: watch -n 5 'free -h'
- Observe RAM consumption growing continuously without bound
- Compare: Run claude CLI in separate terminal – remains stable
Claude Model
Opus
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.12 (Claude Code)
Platform
Anthropic API
Operating System
Ubuntu/Debian Linux
Terminal/Shell
Other
Additional Information
CLI vs Extension Isolation Test
| Interface | Memory Behavior | Result |
|-----------|-----------------|--------|
| Claude Code CLI (v2.1.12) | Stable ~150MB idle | ✅ No leak |
| Claude Code Extension (v2.1.11) in code-server | Unbounded growth to 13GB+ | ❌ Leaks |
This rules out system-level memory issues, Node.js runtime problems, and Claude backend/API issues.
Potentially Related Issues
- #17650: Memory leak ~3GB within seconds (CLI, Linux) – CLI issue
- #18280: Memory thrashing loop (CLI v2.1.7, Proxmox) – CLI with CPU
- #12611: Extension host OOM crash (VS Code) – closed as duplicate
- #13130: EventEmitter memory leak after Auto-Update
- #11315: 129GB RAM consumed (CLI, Linux)
None exactly match: Extension in code-server leaking without activity while CLI remains stable.
Environment Details
- code-server: 4.106.2
- Proxmox LXC container
- Kernel: 6.8.12-17-pve
This issue has 7 comments on GitHub. Read the full discussion on GitHub ↗