[BUG] React error #31 when using custom slash command
Resolved 💬 3 comments Opened Jan 9, 2026 by artnikbrothers Closed Jan 12, 2026
Description
React minified error #31 occurs when using a custom slash command from .claude/commands/.
Steps to Reproduce
- Create custom command in
.claude/commands/my-command.md - Invoke with
/my-command - Error appears
Error Output
ERROR Minified React error #31; visit
https://react.dev/errors/31?args[]=object%20with%20keys%20%7Bsource%7D for the full message or use the non-minified dev environment for full errors and additional helpful warnings.
file:///.nvm/versions/node/v22.18.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:743:8724
-cB (file:///...cli.js:743:8724)
-XB (file:///...cli.js:743:10834)
-QD (file:///...cli.js:743:12402)
-yE (file:///...cli.js:743:14687)
- (file:///...cli.js:743:15200)
-OZ (file:///...cli.js:743:35534)
-Hx (file:///...cli.js:743:51675)
-jJ (file:///...cli.js:743:85801)
-cf (file:///...cli.js:743:84781)
-zj (file:///...cli.js:743:84606)
Environment
- Claude Code version: v2.1.2
- Node: v22.18.0
- Platform: macOS Darwin 25.2.0
Additional Context
Error #31 means "Objects are not valid as a React child" - something with key {source} is being passed where a renderable element is expected.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗