[BUG] Ran out of disk space in a session. Claude code now broken.

Resolved 💬 4 comments Opened Oct 18, 2025 by mattjes Closed Jan 10, 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?

Script was running inside of claude -> ran out of space in filesystem. -> error logs (forgot to save sorry)

Freed up space and rebooted.

Claude code is now broken.

$ claude --dangerously-skip-permissions
claude: command not found

Fixed:

~/.nvm/versions/node/v20.19.5/lib/node_modules/@anthropic-ai$ sudo rm -r claude-code/
~/.nvm/versions/node/v20.19.5/lib/node_modules/@anthropic-ai$ npm install -g @anthropic-ai/claude-code

added 3 packages in 2s

2 packages are looking for funding
run npm fund for details
anon@agent:~/.nvm/versions/node/v20.19.5/lib/node_modules/@anthropic-ai$ claude -> working

What Should Happen?

Prefer claude code doesn't break itself and stop before running OOM in filesystem.

Error Messages/Logs

$ npm uninstall -g @anthropic-ai/claude-code
npm error code ENOTEMPTY
npm error syscall rename
npm error path /home/anon/.nvm/versions/node/v20.19.5/lib/node_modules/@anthropic-ai/claude-code
npm error dest /home/anon/.nvm/versions/node/v20.19.5/lib/node_modules/@anthropic-ai/.claude-code-YeremjPI
npm error errno -39
npm error ENOTEMPTY: directory not empty, rename '/home/anon/.nvm/versions/node/v20.19.5/lib/node_modules/@anthropic-ai/claude-code' -> '/home/anon/.nvm/versions/node/v20.19.5/lib/node_modules/@anthropic-ai/.claude-code-YeremjPI'
npm error A complete log of this run can be found in: /home/anon/.npm/_logs/2025-10-18T08_30_01_840Z-debug-0.log

$ cat /home/anon/.npm/_logs/2025-10-18T08_30_01_840Z-debug-0.log
0 verbose cli /home/anon/.nvm/versions/node/v20.19.5/bin/node /home/anon/.nvm/versions/node/v20.19.5/bin/npm
1 info using npm@10.8.2
2 info using node@v20.19.5
3 silly config load:file:/home/anon/.nvm/versions/node/v20.19.5/lib/node_modules/npm/npmrc
4 silly config load:file:/home/anon/.npmrc
5 silly config load:file:/home/anon/.nvm/versions/node/v20.19.5/etc/npmrc
6 verbose title npm uninstall @anthropic-ai/claude-code
7 verbose argv "uninstall" "--global" "@anthropic-ai/claude-code"
8 verbose logfile logs-max:10 dir:/home/anon/.npm/_logs/2025-10-18T08_30_01_840Z-
9 verbose logfile /home/anon/.npm/_logs/2025-10-18T08_30_01_840Z-debug-0.log
10 silly packumentCache heap:4345298944 maxSize:1086324736 maxEntrySize:543162368
11 silly logfile start cleaning logs, removing 1 files
12 silly logfile done cleaning log files
13 silly idealTree buildDeps
14 silly reify mark retired [
14 silly reify   '/home/anon/.nvm/versions/node/v20.19.5/lib/node_modules/@anthropic-ai/claude-code'
14 silly reify ]
15 silly reify moves {
15 silly reify   '/home/anon/.nvm/versions/node/v20.19.5/lib/node_modules/@anthropic-ai/claude-code': '/home/anon/.nvm/versions/node/v20.19.5/lib/node_modules/@anthropic-ai/.claude-code-YeremjPI'
15 silly reify }
16 verbose stack Error: ENOTEMPTY: directory not empty, rename '/home/anon/.nvm/versions/node/v20.19.5/lib/node_modules/@anthropic-ai/claude-code' -> '/home/anon/.nvm/versions/node/v20.19.5/lib/node_modules/@anthropic-ai/.claude-code-YeremjPI'
16 verbose stack     at async Object.rename (node:internal/fs/promises:782:10)
16 verbose stack     at async moveFile (/home/anon/.nvm/versions/node/v20.19.5/lib/node_modules/npm/node_modules/@npmcli/fs/lib/move-file.js:30:5)
16 verbose stack     at async Promise.allSettled (index 0)
16 verbose stack     at async [reifyPackages] (/home/anon/.nvm/versions/node/v20.19.5/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:325:11)
16 verbose stack     at async Arborist.reify (/home/anon/.nvm/versions/node/v20.19.5/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:142:5)
16 verbose stack     at async Uninstall.exec (/home/anon/.nvm/versions/node/v20.19.5/lib/node_modules/npm/lib/commands/uninstall.js:51:5)
16 verbose stack     at async Npm.exec (/home/anon/.nvm/versions/node/v20.19.5/lib/node_modules/npm/lib/npm.js:207:9)
16 verbose stack     at async module.exports (/home/anon/.nvm/versions/node/v20.19.5/lib/node_modules/npm/lib/cli/entry.js:74:5)
17 error code ENOTEMPTY
18 error syscall rename
19 error path /home/anon/.nvm/versions/node/v20.19.5/lib/node_modules/@anthropic-ai/claude-code
20 error dest /home/anon/.nvm/versions/node/v20.19.5/lib/node_modules/@anthropic-ai/.claude-code-YeremjPI
21 error errno -39
22 error ENOTEMPTY: directory not empty, rename '/home/anon/.nvm/versions/node/v20.19.5/lib/node_modules/@anthropic-ai/claude-code' -> '/home/anon/.nvm/versions/node/v20.19.5/lib/node_modules/@anthropic-ai/.claude-code-YeremjPI'
23 silly unfinished npm timer reify 1760776202045
24 silly unfinished npm timer reify:retireShallow 1760776202063
25 verbose cwd /home/anon/custom-models/experiment two
26 verbose os Linux 6.14.0-1014-aws
27 verbose node v20.19.5
28 verbose npm  v10.8.2
29 verbose exit -39
30 verbose code -39
31 error A complete log of this run can be found in: /home/anon/.npm/_logs/2025-10-18T08_30_01_840Z-debug-0.log

Steps to Reproduce

  1. Have claude run training script for llm
  2. Fill up space on filesystem\
  3. Result in error.

Claude Model

Not sure / Multiple models

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

Dnno, autoupdates probably latest.

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

Other

Additional Information

_No response_

View original on GitHub ↗

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