Regression: shell-mode code block suggestions no longer include `!` prefix

Resolved 💬 1 comment Opened May 21, 2026 by psilva2026 Closed Jun 21, 2026

When Claude Code renders a fenced code block whose content is ! <command>, the suggestion surfaced in the user's input box is now missing the leading !. This is a regression — the behaviour previously worked correctly, including for commands the harness would not allow to run (deny list / rules denial), where the ! prefix was still present, activating shell mode and surfacing the suggestion for the user to accept and run.

Expected behavior: The suggestion appears in the input box with the ! prefix, activating shell mode so the user can accept and run it.

Actual behavior: The suggestion appears without the !, shell mode is not activated, and the suggestion cannot be accepted as a shell command.

Reproduction:

  1. In Claude Code settings, add docker to the Bash deny list so Claude cannot run it directly.
  2. Ask Claude: "give a docker command to prune docker images"
  3. Claude emits a response containing:

````

! docker image prune

````

  1. Observe the suggestion in the input box.

Actual (bug): The suggestion appears without ! and shell mode is not activated.

Expected: The suggestion appears as ! docker image prune, activating shell mode so the user can accept and run it directly. This is the intended workflow for commands Claude itself is not permitted to execute.

Environment:

  • Claude Code CLI: 2.1.140
  • macOS: 26.4.1 (Build 25E253)

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗