"Don't ask again" for joined cd commands
Status Fixed / completed
Maintainer reply ✓ Yes — rboyce-ant
Activity 5 comments · opened Mar 2, 2025 · closed Mar 13, 2025
💡 Likely answer: A maintainer (rboyce-ant, contributor)
responded on this thread — see the highlighted reply below.
Claude Code will often chain a cd command with other commands. The result is that the option "Yes, and don't ask again for cd commands..." isn't really accurate, in that it will give the same option again the next time a cd command is chained to a different follow-up command. It's not a big deal, just confusing. It would be clearer to say "don't ask again for this specific command combination."
Example:
Bash command │
│ │
│ cd /Users/user1/auth-service && node deploy-db-schema.js │
│ Changes directory and runs database schema deployment script │
│ │
│ Do you want to proceed? │
│ ❯ Yes │
│ Yes, and don't ask again for cd commands in /Users/user1/auth-service
5 Comments
Claude Code chains other commands besides
cd. The one I can think of offhand isgit addandgit commit.My concern is that the user might approve the first command (
cdorgit addor whatever), but not carefully review whether or not the chained commands are safe / appropriate at the moment. "Yes, and don't ask again..." seems potentially dangerous, without more clarity about what you're perma-allowing.Here's an example from just now, Claude Code wanted to do:
cd (dirpath) && yarn buildIt asks about
cdand offersdon't ask again, but the "don't ask again" is aboutcd, notyarn build.It seems like "don't ask again" should be about _all_ the commands it will run, not just the first one.
Hmm, now it's trying to do the same
cd (dirpath) && yarn buildcommand, but this time it's asking aboutyarn build. So maybe it does the right thing sometimes, and sometimes not? I'm pretty sure I've been saying "Yes", and not "Yes, and don't ask again".macOS Sonoma 14.7, M1 Max, iTerm2, 0.2.32 (Claude Code)
This is fixed now, thanks for the feedback! You'll be asked to approve both
cdandnodecommands when asked about this command in version 0.2.39 and newer.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.