[BUG] Syntax highlighting colors word after slash command blue

Resolved 💬 6 comments Opened Jan 21, 2026 by cjsimon2 Closed Mar 14, 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?

aIn the terminal input, when typing a slash command followed by a period and then more text, the word immediately after the slash command is incorrectly highlighted in blue.

For example, when typing:
then run /checkyourwork. When that completes, push and commit.

The word "When" is highlighted in blue, even though it's not part of the slash command. Only /checkyourwork should be blue.

It appears the syntax highlighter is not properly terminating the command token when a period follows the slash command.

What Should Happen?

Only the slash command itself (e.g., /checkyourwork) should be highlighted in blue. The word following the slash command should retain normal text coloring.

Error Messages/Logs

Steps to Reproduce

  1. Open Claude Code in a terminal
  2. Start typing a prompt that includes a slash command followed by a period and more text
  3. 3. For example: then run /checkyourwork. When that completes, push and commit.
  4. 4. Observe that the word "When" is highlighted in blue along with the slash command

Claude Model

None

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.12 (Claude Code)

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

VS Code integrated terminal

Additional Information

Screenshot showing the issue is available and can be attached to this issue.

<img width="1605" height="545" alt="Image" src="https://github.com/user-attachments/assets/bf511713-ed83-4f34-9ce8-87ad92d2de43" />

View original on GitHub ↗

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