[BUG] Bash comments break permissions

Resolved 💬 9 comments Opened Feb 28, 2026 by jnjaeschke Closed Apr 19, 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?

Since a few days ago Claude Code sometimes adds comments to tool executions, like this:

# Check the diff
git diff ....

Even if the allowlist contains Bash(git:*), I need to manually approve.

The same happens if the comment is after the command, or if the command itself uses the # sign for whatever reason.

What Should Happen?

If Claude Code runs a command, it should not add comments around it, so that tools from the allowlist execute without manual approval.

Error Messages/Logs

Steps to Reproduce

This mostly happens when I try to let it do a large task autonomously, which involves lots of external tool calls, for example reworking a coding task from one approach to another, which involves heavy git work.

Claude Model

Not sure / Multiple models

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.34 (Claude Code)

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

VS Code integrated terminal

Additional Information

_No response_

View original on GitHub ↗

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