[BUG] Custom commands fail in Claude CLI

Resolved 💬 3 comments Opened Feb 25, 2026 by Yuwin98 Closed Feb 28, 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?

When trying to run custom commands the below mentioned error happens. It also happens for a bare bone custom command markdown file as well.

I existed claude and resumed session so these markdown files will get into memory before trying

What Should Happen?

Claude should run the custom command and create a commit message for all staging changes

Error Messages/Logs

API Error: 400 {"type":"error","error":{"type":"invalid_r
     equest_error","message":"messages: text content blocks
     must be
     non-empty"},"request_id":"req_011CYTvPjhjiaj4yNpqKUY4x"}

Steps to Reproduce

  1. Create a markdown file in .claude/commands folder named commit-message.md
  2. Restart claude session and try to run the command.

** I have attached both my markdown file and a bare bone command markdown file that also failed.

test.md
commit-message.md

Claude Model

Sonnet (default)

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.53

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

_No response_

View original on GitHub ↗

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