[Bug] Environment variables in bash commands trigger unnecessary user prompts

Resolved 💬 3 comments Opened Oct 26, 2025 by cbarraford Closed Oct 29, 2025

Bug Description
Sometimes bash commands have env vars preceeding the command. This causes claude to prompt the user if its okay to run the command, even if the command has already been approved previously.

Example: DOCKER_BUILDKIT=1 docker build .

When checking if we need to prompt the user for permission to run this command, we should first prune the env vars and get to the actual command

Environment Info

  • Platform: darwin
  • Terminal: ghostty
  • Version: 2.0.27
  • Feedback ID:

Errors

[{"error":"AxiosError: Request failed with status code 403\n    at UR (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:24:1136)\n    at Unzip.<anonymous> (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:29:9845)\n    at Unzip.emit (node:events:520:35)\n    at Unzip.emit (node:domain:489:12)\n    at endReadableNT (node:internal/streams/readable:1701:12)\n    at process.processTicksAndRejections (node:internal/process/task_queues:90:21)\n    at g3A.request (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:31:2129)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async dh2 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:3574:15030)","timestamp":"2025-10-26T00:34:25.494Z"},{"error":"AxiosError: Request failed with status code 403\n    at UR (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:24:1136)\n    at Unzip.<anonymous> (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:29:9845)\n    at Unzip.emit (node:events:520:35)\n    at Unzip.emit (node:domain:489:12)\n    at endReadableNT (node:internal/streams/readable:1701:12)\n    at process.processTicksAndRejections (node:internal/process/task_queues:90:21)\n    at g3A.request (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:31:2129)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async v2I (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1558:467)\n    at async Promise.all (index 0)\n    at async file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1544:11827","timestamp":"2025-10-26T00:36:34.838Z"}]

View original on GitHub ↗

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