Invalid Version error on startup: semver parsing fails on changelog header '2.1.0 (2026-01-07)'

Resolved 💬 8 comments Opened Jan 7, 2026 by graemejross Closed Jan 7, 2026

Description

After Claude Code auto-updated to 2.1.0, all new sessions fail to start with the error:

ERROR  Invalid Version: 2.1.0 (2026-01-07)

The error occurs during startup before any interactive session begins.

Root Cause

The changelog fetched from Anthropic's servers contains version headers in the format:

## 2.1.0 (2026-01-07)

Somewhere in the startup code, this string is being parsed as a semver version. The semver library cannot parse version strings with date suffixes in parentheses, causing the Invalid Version error.

Evidence

  1. The cachedChangelog field in ~/.claude.json contains the problematic string
  2. Removing cachedChangelog doesn't fix it because it's re-fetched on startup
  3. Rolling back to 2.0.76 doesn't fix it because older versions also fetch and parse the new changelog
  4. Setting DISABLE_AUTOUPDATER=1 environment variable does fix it by skipping the changelog fetch

Workaround

export DISABLE_AUTOUPDATER=1
claude

Environment

  • OS: Debian 12 (Linux 6.1.0-40-amd64)
  • Claude Code version: 2.1.0 (also affects 2.0.76 when fetching new changelog)
  • Installation: Native binary (~/.local/share/claude/versions/)

Expected Behavior

The changelog header format ## VERSION (DATE) should not be parsed as a semver version string. The version comparison logic should extract only the version number (e.g., 2.1.0) before parsing.

Stack Trace (partial)

/$bunfs/root/claude:810:8909

(The minified code makes it difficult to identify the exact function, but it occurs during startup initialization)

View original on GitHub ↗

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