Regression: shell-mode code block suggestions no longer include `!` prefix
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:
- In Claude Code settings, add
dockerto the Bash deny list so Claude cannot run it directly. - Ask Claude:
"give a docker command to prune docker images" - Claude emits a response containing:
````
! docker image prune
````
- 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(Build25E253)
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗