Compound command re-prompts in same session after approval

Resolved 💬 4 comments Opened Apr 2, 2026 by jeffAuston Closed Apr 3, 2026

Description

When a compound Bash command using && is approved in a session, the same exact command re-prompts later in the same session. The approval doesn't appear to persist for compound commands.

Steps to reproduce

  1. Have Bash(source:*) and Bash(python3:*) in settings.json allowlist
  2. Run a compound command like: source ../venv/bin/activate && python3 -m pytest tests/test_file.py -x -q
  3. Get prompted with: 'source' evaluates arguments as shell code
  4. Approve it (option 1: Yes)
  5. Later in the same session, the exact same command runs again
  6. Get prompted again with the identical message

Expected behavior

After approving a command once in a session, the same command should not re-prompt in that session.

Observed behavior

The compound command re-prompts every time it's invoked, even within the same session.

Notes

  • Individual commands (source ... alone, python3 ... alone) do not re-prompt after approval
  • The issue appears specific to compound commands joined with &&
  • Both Bash(source:*) and Bash(python3:*) are in the allowlist, but the compound form still prompts
  • Observed across multiple sessions (different engineers/worktrees, same machine)

Environment

  • macOS (Darwin 24.2.0)
  • Claude Code CLI

View original on GitHub ↗

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