claude-code - 💡(How to fix) Fix Regression: shell-mode code block suggestions no longer include `!` prefix

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Code Example



---
RAW_BUFFERClick to expand / collapse

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)

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING