[BUG] bash mode persists in queued messages

Resolved 💬 4 comments Opened Oct 24, 2025 by pmatos Closed Jan 11, 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?

lets say I run something in bash mode: ! ./run_tests. Then queue a message while this is happening: "> Plan a fix for the failing tests.".

Claude will finish running the tests and issue an error like:

! Plan: command not found.

What Should Happen?

The bash mode should not be sticky and the message should not be queued as a bash mode message. Also because I specifically wrote the message before a > without !.

Error Messages/Logs

Steps to Reproduce

  1. run a long bash mode
  2. queue normal message
  3. See normal message failing because first work of message is not a valid bash command.
! sleep 10 && ls
  ⎿  CLAUDE.md
     filters
     LICENSE
     … +11 lines (ctrl+o to expand)

! Which folders did you find?
  ⎿  (eval):1: no matches found: find?

Note that when I wrote the "Which folders did you find?" it was before a >, not a !

Claude Model

Sonnet (default)

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.0.26

Platform

Anthropic API

Operating System

Linux (Archlinux distro)

Terminal/Shell

Other

Additional Information

_No response_

View original on GitHub ↗

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