[BUG] v2.1.87 regression: "An unknown error occurred (Unexpected)" on startup — v2.1.86 works fine (macOS)

Resolved 💬 4 comments Opened Mar 29, 2026 by acosmi-fushihua Closed May 4, 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?

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report
  • [x] I am using the latest version of Claude Code

What's Wrong?

After auto-updating from v2.1.86 to v2.1.87, Claude Code fails to start with the following error:

error: An unknown error occurred (Unexpected)

Downgrading back to v2.1.86 immediately resolves the issue. This is a clear regression introduced in v2.1.87.

Steps to Reproduce

  1. Have Claude Code v2.1.86 installed and working
  2. Allow auto-update to v2.1.87 (or manually install v2.1.87)
  3. Run claude in any directory
  4. Observe: error immediately, Claude Code does not start

Expected Behavior

Claude Code should start normally, as it did on v2.1.86.

Actual Behavior

error: An unknown error occurred (Unexpected)

Workaround

Downgrade to v2.1.86:

npm uninstall -g @anthropic-ai/claude-code
npm install -g @anthropic-ai/claude-code@2.1.86

Environment

  • Claude Code version: 2.1.87 (broken) / 2.1.86 (working)
  • OS: macOS (Apple Silicon / Mac Studio)
  • Node.js version: v24.13.0
  • Shell: zsh
  • Installation method: npm global install

Additional Notes

  • The error is NOT related to file descriptors (previously fixed by ulimit)
  • The issue appeared immediately after silent auto-update to 2.1.87
  • No changes were made to the environment between working and broken states

What Should Happen?

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report
  • [x] I am using the latest version of Claude Code

What's Wrong?

After auto-updating from v2.1.86 to v2.1.87, Claude Code fails to start with the following error:

error: An unknown error occurred (Unexpected)

Downgrading back to v2.1.86 immediately resolves the issue. This is a clear regression introduced in v2.1.87.

Steps to Reproduce

  1. Have Claude Code v2.1.86 installed and working
  2. Allow auto-update to v2.1.87 (or manually install v2.1.87)
  3. Run claude in any directory
  4. Observe: error immediately, Claude Code does not start

Expected Behavior

Claude Code should start normally, as it did on v2.1.86.

Actual Behavior

error: An unknown error occurred (Unexpected)

Workaround

Downgrade to v2.1.86:

npm uninstall -g @anthropic-ai/claude-code
npm install -g @anthropic-ai/claude-code@2.1.86

Environment

  • Claude Code version: 2.1.87 (broken) / 2.1.86 (working)
  • OS: macOS (Apple Silicon / Mac Studio)
  • Node.js version: v24.13.0
  • Shell: zsh
  • Installation method: npm global install

Additional Notes

  • The error is NOT related to file descriptors (previously fixed by ulimit)
  • The issue appeared immediately after silent auto-update to 2.1.87
  • No changes were made to the environment between working and broken states

Error Messages/Logs

Steps to Reproduce

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report
  • [x] I am using the latest version of Claude Code

What's Wrong?

After auto-updating from v2.1.86 to v2.1.87, Claude Code fails to start with the following error:

error: An unknown error occurred (Unexpected)

Downgrading back to v2.1.86 immediately resolves the issue. This is a clear regression introduced in v2.1.87.

Steps to Reproduce

  1. Have Claude Code v2.1.86 installed and working
  2. Allow auto-update to v2.1.87 (or manually install v2.1.87)
  3. Run claude in any directory
  4. Observe: error immediately, Claude Code does not start

Expected Behavior

Claude Code should start normally, as it did on v2.1.86.

Actual Behavior

error: An unknown error occurred (Unexpected)

Workaround

Downgrade to v2.1.86:

npm uninstall -g @anthropic-ai/claude-code
npm install -g @anthropic-ai/claude-code@2.1.86

Environment

  • Claude Code version: 2.1.87 (broken) / 2.1.86 (working)
  • OS: macOS (Apple Silicon / Mac Studio)
  • Node.js version: v24.13.0
  • Shell: zsh
  • Installation method: npm global install

Additional Notes

  • The error is NOT related to file descriptors (previously fixed by ulimit)
  • The issue appeared immediately after silent auto-update to 2.1.87
  • No changes were made to the environment between working and broken states

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.1.87

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

_No response_

View original on GitHub ↗

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