[BUG] CLI 2.1.154 breaks with API Error 422 - Invalid message role "system"

Open 💬 8 comments Opened May 28, 2026 by xiaomingwinning

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?

Environment

  • OS: macOS
  • CLI Version: 2.1.154 (broken), 2.1.153 (working)
  • Update Method: Used claude --update command

Steps to Reproduce

  1. Have Claude Code CLI version 2.1.153 working
  2. Run claude --update to upgrade to 2.1.154
  3. Try to use Claude Code CLI
  4. Observe 422 API error

Workaround

Downgraded to version 2.1.153 using:

npm install -g @anthropic-ai/claude-code@2.1.153

Expected Behavior

CLI should work without API errors after update.

Actual Behavior

CLI throws 422 error related to invalid message role.

What Should Happen?

CLI throws 422 error related to invalid message role.

Error Messages/Logs

Steps to Reproduce

Environment

  • OS: macOS
  • CLI Version: 2.1.154 (broken), 2.1.153 (working)
  • Update Method: Used claude --update command

Steps to Reproduce

  1. Have Claude Code CLI version 2.1.153 working
  2. Run claude --update to upgrade to 2.1.154
  3. Try to use Claude Code CLI
  4. Observe 422 API error

Workaround

Downgraded to version 2.1.153 using:

npm install -g @anthropic-ai/claude-code@2.1.153

Expected Behavior

CLI should work without API errors after update.

Actual Behavior

CLI throws 422 error related to invalid message role.

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.1.154

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

_No response_

View original on GitHub ↗

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