[BUG] CLI Commands being treated improperly during other operation

Resolved 💬 4 comments Opened Feb 12, 2026 by davidmanheim Closed Feb 15, 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?

Situation: While Claude Code is working on a task, I tell it something, then I enter a built-in CLI command, e.g. "/stats", on a new line.

Behavior: It queues the CLI command, then passes the text of the command to Claude when finished, so that Claude responds, e.g., "Regarding /stats — that's a built-in CLI command, not something I handle. It should have been processed by the Claude Code client directly. If it didn't trigger, try running it again on its own line."

What Should Happen?

Expected Behavior: Either immediately executing the CLI command during other operation, or waiting, then executing the CLI command after current operation is complete rather than passing it to Claude.

(This seems like it should be intercepted in the interface, when a command is used, not passed to the LLM.)

Error Messages/Logs

As noted above:
"Regarding /stats — that's a built-in CLI command, not something I handle. It should have been processed by the Claude Code client directly. If it didn't trigger, try running it again on its own line."

Steps to Reproduce

  1. Ask Claude to do any task that takes time.
  2. (Possibly required, unsure.) During the task, ask for something else, which get queued.
  3. Still during the task, enter a CLI command as a new response.

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.39

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

PowerShell

Additional Information

_No response_

View original on GitHub ↗

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