[Feature Request] Add strict mode flag to error on unrecognized commands instead of starting session

Open 💬 0 comments Opened Jul 16, 2026 by clo-ciq

Bug Description
I'd like the claude CLI to have a flag or configuration that tells it to treat input not recognized as one of the CLI's commands as an error, rather than starting a session.
I had used /statusline to include my active username in the status (I have a work account and personal and need to know which I'm using easily). The setup that the statusline tool landed on was claude whoami, which worked as expected. But I did not realize it was creating a whole new session each time.
The fix was to use claude auth status which is a recognized command by the CLI.
This created 4364 unnecessary sessions in the last 30 days, silently.

Environment Info

  • Platform: darwin
  • Terminal: iTerm.app
  • Version: 2.1.211
  • Feedback ID: e3bbd3c9-17f7-43d9-9b4e-590fa57a3e87

Errors

[]

View original on GitHub ↗