claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

[BUG] Unnecessary approval prompts for chained bash commands with curl interrupts development flow

Open thedotmack opened this issue 7 months ago • 1 comments

Environment

  • Platform (select one):
    • [ ] Anthropic API
    • [ ] AWS Bedrock
    • [ ] Google Vertex AI
    • [x] Other: Claude Code (CLI tool)
  • Claude CLI version: 1.0.21
  • Operating System: macOS 15.5
  • Terminal: VSCode integrated terminal

Bug Description

Claude Code unnecessarily requests approval for chained bash commands containing curl, even when the commands are harmless and similar commands have been approved. This creates frequent interruptions in the development workflow with no option to "approve similar" commands.

Steps to Reproduce

  1. Run Claude Code and have it execute a command that chains curl with other bash operations
  2. Example command that triggers the issue: curl -s http://localhost:3000 > /dev/null && echo "Refreshed for WebSocket debugging"
  3. Claude Code will pause and request approval
  4. Even after approving, similar chained curl commands continue to require manual approval each time

Expected Behavior

  • Single curl commands that are approved should extend to similar chained curl commands
  • There should be an option to "approve similar" for chained bash commands
  • Harmless operations like piping to /dev/null or echoing status messages should not trigger additional approval requirements

Actual Behavior

  • Every chained bash command containing curl requires manual approval
  • No option to approve similar commands
  • Development flow is constantly interrupted by approval prompts for routine operations
  • Single curl commands work fine, but adding &&, |, or other bash operators triggers the approval requirement

Additional Context

Example of commands that trigger unnecessary approvals:

  • curl -s http://localhost:3001/api/stats | jq .
  • curl -s http://localhost:3000 > /dev/null && echo "Refreshed for WebSocket debugging"

These are routine development commands that pose no security risk but require manual intervention each time, significantly slowing down the development process.

thedotmack avatar Jun 12 '25 19:06 thedotmack

I tried this in .claude/settings.local.json with some success The second one in the list should cover everything, but it didn't for some reason.

  • "Bash(source:*)",
  • "Bash(source * && *)",
  • "Bash(source * && python*)",
  • "Bash(source * && pytest*)",
  • "Bash(curl:*)",

You could try

  • "Bash(curl:* && *)",

adamkwhite avatar Jun 16 '25 22:06 adamkwhite

This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.

github-actions[bot] avatar Oct 10 '25 10:10 github-actions[bot]