Compound command re-prompts in same session after approval
Status Fixed / completed
Maintainer reply None cached
Activity 4 comments · opened Apr 2, 2026 · 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
- Have
Bash(source:*)andBash(python3:*)in settings.json allowlist - Run a compound command like:
source ../venv/bin/activate && python3 -m pytest tests/test_file.py -x -q - Get prompted with:
'source' evaluates arguments as shell code - Approve it (option 1: Yes)
- Later in the same session, the exact same command runs again
- 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:*)andBash(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
4 Comments
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
Adding data from our logging. We built a PermissionRequest hook that captures every permission prompt to a database.
35 prompts in 2 days for the same pattern across 3 concurrent sessions:
| Session | Prompts | Period |
|---------|---------|--------|
| Jordan | 26 | Apr 2 |
| Justin | 8 | Apr 2-3 |
| John | 1 | Apr 2 |
All are
source ../venv/bin/activate && python3 <script>— the most common compound command in our workflow (every test run, every research script). BothBash(source:*)andBash(python3:*)are in the allowlist. The approval does not persist within a session — same command re-prompts multiple times.This is a significant friction cost for multi-session workflows.
Closing as duplicate of #27688 (same root cause: compound
&&commands don't persist approvals). Added our quantified data (35 prompts in 2 days) to that issue.This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.