Claude Code 2.1.0 fails to start with "Invalid Version: 2.1.0 (2026-01-07)" error on macOS
After updating Claude Code to version 2.1.0 on macOS, running claude shows the error "Invalid Version: 2.1.0 (2026-01-07)" and the tool does not start. Setting the TERM_PROGRAM_VERSION environment variable did not help. Is there a fix or workaround?
Originally asked on GitHub: https://github.com/anthropics/claude-code/issues/16673
4 answers
This issue was closed as a duplicate, so the thread does not contain a maintainer fix or a confirmed release that resolves it. The error appears during startup and comes from Claude Code's own version string, which includes a date suffix ("2.1.0 (2026-01-07)") that a semver parser rejects. The stack trace points to the internal version-parsing code in the bundled binary.
The thread does not describe a working fix. One commenter linked to a workaround in issue #16673 (comment 3720643589), but the thread does not state its contents, so check that linked issue directly before applying anything. Reporters also confirmed the problem on Node v20.19.3 and v23.11.0 and with a native install, so Node version does not appear to be the cause.
General advice: if you are blocked, try reinstalling or staying on the previous version until a fixed release is published, and watch the linked duplicate issues (#16671, #16672) for updates. Clearing TERM_PROGRAM_VERSION is not a fix, since the error comes from Claude Code's own version string rather than from the terminal.
Did this work for you?What a GitHub user tried on GitHub (Didn't work)
Updated to Claude Code 2.1.0 on macOS and ran claude, which produced the Invalid Version error at startup.
Source: https://github.com/anthropics/claude-code/issues/16673 (opens external site)
Did this work for you?What @codybrom tried on GitHub (Didn't work)
Ran
unset TERM_PROGRAM_VERSION && claudeto clear the terminal version variable before startup.Source: https://github.com/anthropics/claude-code/issues/16673#issuecomment-3720614535 (opens external site)
Did this work for you?What @codybrom tried on GitHub (Didn't work)
Ran
TERM_PROGRAM_VERSION="1.0.0" claudeto set a fake terminal version before startup.Source: https://github.com/anthropics/claude-code/issues/16673#issuecomment-3720614535 (opens external site)
Did this work for you?