Auto-update leaves temp directories and requires manual intervention

Resolved 💬 3 comments Opened Oct 31, 2025 by 5u6r054 Closed Oct 31, 2025

Issue

The auto-update feature is not working as advertised and requires manual intervention, defeating the purpose of having an 'auto' update.

Expected Behavior

When auto-update is enabled, Claude Code should automatically update itself without requiring manual npm commands or cleanup.

Actual Behavior

  1. Auto-update fails silently or leaves temp directories behind
  2. Temp directories like .claude-code-* accumulate in /opt/homebrew/lib/node_modules/@anthropic-ai/
  3. These temp directories prevent future updates from working
  4. Requires manual cleanup with sudo rm -rf
  5. Requires manually killing Claude processes with pkill claude
  6. Requires manually running npm i -g @anthropic-ai/claude-code

Environment

  • Platform: macOS (darwin)
  • Installation: Homebrew npm global install
  • Location: /opt/homebrew/lib/node_modules/@anthropic-ai/

Reproduction

  1. Enable auto-update in settings
  2. Let Claude Code run for a while with updates available
  3. Notice that updates don't apply automatically
  4. Manual update attempts fail due to leftover temp directories

Impact

This completely negates the value of having an auto-update feature. Users expect 'auto' update to work automatically without manual intervention or writing custom update scripts.

Suggested Fix

The auto-updater should:

  1. Properly clean up temp directories on failed updates
  2. Gracefully handle running processes (terminate and restart)
  3. Provide clear feedback when auto-update fails
  4. Not require sudo or manual cleanup

View original on GitHub ↗

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