[BUG] Invalid Version: 2.1.0 (2026-01-07)

Resolved 💬 72 comments Opened Jan 7, 2026 by alleneubank Closed Jan 7, 2026
💡 Likely answer: A maintainer (bcherny, collaborator) responded on this thread — see the highlighted reply below.

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?

update to claude 2.1.0 then run claude. see the error.

<img width="658" height="144" alt="Image" src="https://github.com/user-attachments/assets/c5448ca8-0194-4aa4-a543-48e20a4fc6f3" />

What Should Happen?

claude should start when using version 2.1.0

Error Messages/Logs

Steps to Reproduce

update to 2.1.0 and run claude.

Claude Model

None

Is this a regression?

No, this never worked

Last Working Version

_No response_

Claude Code Version

2.1.0

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Other

Additional Information

_No response_

View original on GitHub ↗

72 Comments

camilotabaresj · 6 months ago

Same here

Taylorjtt · 6 months ago

I am having this same issue

arndtvoges · 6 months ago

Same

Edit: Since my comment is high up, workaround here:
https://github.com/anthropics/claude-code/issues/16673#issuecomment-3720643589

MarlonAEC · 6 months ago

Same thing for me my session just crashed in the middle of a debug session and then when I tried to reopen it I get this issue

codybrom · 6 months ago

Confirming this issue.

Environment:

  • Claude Code: 2.1.0 (native install)
  • macOS (Apple Terminal)
  • Node: v24.11.1
  • TERM_PROGRAM_VERSION: 465

Stack trace excerpt:

ERROR  Invalid Version: 2.1.0 (2026-01-07)
- Pw (/$bunfs/root/claude:813:8909)
- CfD (/$bunfs/root/claude:813:14035)

The semver parser is choking on the date suffix in the version string. Likely needs semver.coerce() or stripping the date before parsing.

Workarounds attempted (none worked):

  • unset TERM_PROGRAM_VERSION && claude
  • TERM_PROGRAM_VERSION="1.0.0" claude

The issue is Claude Code's own version string, not the terminal's.

github-actions[bot] · 6 months ago

Found 2 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/16671
  2. https://github.com/anthropics/claude-code/issues/16672

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

tmusterpw · 6 months ago

Same

Shashankphatkure · 6 months ago

same

mike-char · 6 months ago

Same

tedi · 6 months ago

Same here on node 20.19.3

aaravjaichand · 6 months ago

Same

mxidesign-gastique · 6 months ago

same here

Node.js v23.11.0

lfsmoura · 6 months ago

Same

vandercloak · 6 months ago

same issue

mchahed99 · 6 months ago

same

Wuesteon · 6 months ago

same

thatguyinabeanie · 6 months ago

same

pstaylor-patrick · 6 months ago

following

josephglaspie · 6 months ago

Same, following.

kevinchiu · 6 months ago

+1

revmischa · 6 months ago

hlep

okuyiga · 6 months ago

same

shockz09 · 6 months ago

same here

acmeguy · 6 months ago

same

jaodsilv · 6 months ago

Same

marsvogel · 6 months ago

Same

thatguyinabeanie · 6 months ago

same

vanman2024 · 6 months ago

unusable it happened as soon as tried to get into a new conversation yikes can't even use and just bought a second max plan

albsa · 6 months ago

Help suffocating without

jeffs · 6 months ago

Worked around by moving settings out of the way, then selectively restoring them. Also installed a particular version:

curl -fsSL https://claude.ai/install.sh | bash -s -- 2.0.76
mv ~/.claude.json ~/.claude.json.bak
sean-idea9 · 6 months ago

Broke for me also.

marksverdhei · 6 months ago

flop

albsa · 6 months ago
Worked around by moving settings out of the way, then selectively restoring them. mv ~/.claude.json ~/.claude.json.bak

Worked thanks

sean-idea9 · 6 months ago
Worked around by moving settings out of the way, then selectively restoring them. mv ~/.claude.json ~/.claude.json.bak

Even with that it's still broken.

jayeshk29 · 6 months ago

Workaround that worked for me:

rm -rf ~/.claude/cache
mkdir -p ~/.claude/cache
echo "# Changelog" > ~/.claude/cache/changelog.md
chmod 444 ~/.claude/cache/changelog.md

This creates a read-only placeholder that prevents the invalid changelog from being written. Claude starts fine after this.

Root cause seems to be the changelog getting cached with ## 2.1.0 (2026-01-07) which isn't valid semver - the (date) suffix breaks parsing.

ignromanov · 6 months ago
Workaround that worked for me: `` rm -rf ~/.claude/cache mkdir -p ~/.claude/cache echo "# Changelog" > ~/.claude/cache/changelog.md chmod 444 ~/.claude/cache/changelog.md `` This creates a read-only placeholder that prevents the invalid changelog from being written. Claude starts fine after this. Root cause seems to be the changelog getting cached with ## 2.1.0 (2026-01-07) which isn't valid semver - the (date) suffix breaks parsing.

works for me!

davidcpp-ython · 6 months ago

Same

RobRoyce · 6 months ago

rm ~/.claude/cache/changelog.md worked for me!

compilerbauer · 6 months ago

Wow, the second clusterfuck within a week.

gavinsharp · 6 months ago

simpler workaround that worked for me: sed -i '' 's/\(## 2\.1\.0\) ([0-9-]*)/\1/' ~/.claude/cache/changelog.md

tim-win · 6 months ago

An ongoing Claude Code session was able to patch its own (minified) source, fixing the issue. It confirmed the issue was the changelog / semver parsing:

  Problem: Claude Code 2.1.0 crashes with Invalid Version: 2.1.0 (2026-01-07) because the CHANGELOG.md format changed to include dates in version headers (e.g., ## 2.1.0 (2026-01-07)). The code parses these headers as object keys and tries to sort them using semver's .gt() function, which can't parse version strings with date suffixes.

  Affected functions: W37, gw0, and an unnamed function around line 3091 that fetches recent release notes.

  Fix: Wrap version strings with semver.coerce() before comparison. Run these 4 sed commands on cli.js:

  CLI_JS="$HOME/.nvm/versions/node/$(node -v)/lib/node_modules/@anthropic-ai/claude-code/cli.js"

  # Backup first
  cp "$CLI_JS" "$CLI_JS.backup"

  # Patch 1: Fix ve2.gt sort (recent release notes)
  sed -i 's/Object\.keys(B)\.sort((Y,J)=>ve2\.gt(Y,J,{loose:!0})?-1:1)/Object.keys(B).sort((Y,J)=>ve2.gt(ve2.coerce(Y),ve2.coerce(J),{loose:!0})?-1:1)/g' "$CLI_JS"

  # Patch 2: Fix gw0 sort
  sed -i 's/sort((G,Z)=>Wt\.gt(G,Z,{loose:!0})?1:-1)/sort((G,Z)=>Wt.gt(Wt.coerce(G),Wt.coerce(Z),{loose:!0})?1:-1)/g' "$CLI_JS"

  # Patch 3: Fix W37 filter
  sed -i 's/filter((\[J\])=>!Y||Wt\.gt(J,Y,{loose:!0}))/filter(([J])=>!Y||Wt.gt(Wt.coerce(J),Y,{loose:!0}))/g' "$CLI_JS"

  # Patch 4: Fix W37 sort
  sed -i 's/sort((\[J\],\[X\])=>Wt\.gt(J,X,{loose:!0})?-1:1)/sort(([J],[X])=>Wt.gt(Wt.coerce(J),Wt.coerce(X),{loose:!0})?-1:1)/g' "$CLI_JS"

  Note: If installed via different method, adjust CLI_JS path accordingly (e.g., /usr/lib/node_modules/@anthropic-ai/claude-code/cli.js).

If you tell an ongoing CC session the fix, he can probably fix himself.

murilo · 6 months ago

2.1.1 please 🙏 fix it @claude

vanman2024 · 6 months ago

It's definitely seems to be related to claude --resume and claude --continue but maybe not its in the same project new project seems like I can start it weird.

acmeguy · 6 months ago

I love the instant activity, and workaround, here. This is still an opportunity to push for Claude to becoming open source :)

#luv

vanman2024 · 6 months ago
I love the instant activity, and workaround, here. This is still an opportunity to push for Claude to becoming open source :) #luv

That will never happen lol

dreki · 6 months ago
Workaround that worked for me: `` rm -rf ~/.claude/cache mkdir -p ~/.claude/cache echo "# Changelog" > ~/.claude/cache/changelog.md chmod 444 ~/.claude/cache/changelog.md `` This creates a read-only placeholder that prevents the invalid changelog from being written. Claude starts fine after this. Root cause seems to be the changelog getting cached with ## 2.1.0 (2026-01-07) which isn't valid semver - the (date) suffix breaks parsing.

I'm glad this works for people but I would recommend against this, as once a fix is issued (presumably very soon), this could cause problems, especially if people using this fix forget to chmod the changelog back.

Additionally, overwriting the changelog with arbitrary text is something I just flat-out will not do, in the same way I won't pour wiper fluid directly into the crankcase of my car's motor.

efstathiosntonas · 6 months ago
demfabris · 6 months ago

reverting to 2.0.76, removed /cache, changelog and .claude.settings.json. still borked

cameronbrill · 6 months ago

@demfabris same

ericc59 · 6 months ago

edit ~/.claude/cache/changelog.md and delete the date on line 3:

from:
## 2.1.0 (2026-01-07)

to:
## 2.1.0

weakphish · 6 months ago

I guess we know now that it's written in Ink given the crash logs

serpro69 · 6 months ago
Additionally, overwriting the changelog with arbitrary text is something I just flat-out will not do, in the same way I won't pour wiper fluid directly into the crankcase of my car's motor.

How exactly does an arbitrary changelog file break anything? If it does - it's not a changelog.

murilo · 6 months ago

Worked here like so:

echo "" > ~/.claude/cache/changelog.md && chmod 444 ~/.claude/cache/changelog.md

bcherny collaborator · 6 months ago

Fixed! Restart to update

murilo · 6 months ago

Worked here like so:

echo "" > ~/.claude/cache/changelog.md && chmod 444 ~/.claude/cache/changelog.md

xytras1 · 6 months ago

same issue.

Fato07 · 6 months ago

same issue chat

zmievsa · 6 months ago

Happened to me too. Deleted claude, tried to reinstall. Now it cannot reinstall, my system says "zsh: permission denied: claude" when I try to run it, yet I also cannot delete it.

If only I didn't do anything and just waited for 20 more minutes. Now I am not sure how to fix it.

Trying to install it now says "Could not install - another process is currently installing Claude. Please try again in a moment."

Updaete: was able to fix both.

slifty · 6 months ago

To everybody saying "same" and "same issue": you can use the 👍🏻 react on the OP to signal you are experiencing it. This has the added benefit of not creating tons of noise that prevent people from discovering the workarounds.

If you want to subscribe you can still do so without posting; just click the "subscribe" button on the right.

The fixes are already in and identified!

This worked for me, for instance: https://github.com/anthropics/claude-code/issues/16673#issuecomment-3720689911

ericc59 · 6 months ago
dimix · 6 months ago
Happened to me too. Deleted claude, tried to reinstall. Now it cannot reinstall, my system says "zsh: permission denied: claude" when I try to run it, yet I also cannot delete it. If only I didn't do anything and just waited for 20 more minutes. Now I am not sure how to fix it

the native installer now points to the old 2.0.76 and it works.

rjbks · 6 months ago

If the changelog workaround still fails for you, check your .claude.json file (in my case the global one in your home directory), there is a cachedChangelog key with the "bad" changelog there. If you see the bad version as the first entry, change it by removing the date, save it and it should work.

Looks like: "cachedChangelog": "# Changelog\n\n## 2.1.0\n\n- Added automatic skill hot-reload...

weakphish · 6 months ago

Lmao claude update went from 2.1.0 to 2.0.76

0xsline · 6 months ago

same

AidanAllchin · 6 months ago

sed -i '' 's/## 2.1.0 (2026-01-07)/## 2.1.0/' ~/.claude/cache/changelog.md is a temporary fix

EvoTechMike · 6 months ago
Lmao claude update went from 2.1.0 to 2.0.76

fixed for me

muhammadali786381 · 6 months ago

claude update went from 2.1.0 to 2.1.1 works for me now

3rd · 6 months ago

Claude Code is not source available because they don't want us to see how crappy the code is 🥲

LixvYang · 6 months ago

hhha

prdpx7 · 6 months ago
Claude Code is not source available because they don't want us to see how crappy the code is 🥲

You can see the source here, but it's minified
https://www.npmjs.com/package/@anthropic-ai/claude-code?activeTab=code

github-actions[bot] · 5 months ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.