I was fixing the Android build of my wallpaper app one afternoon, opened Claude Code in Android Studio's terminal, and asked it to run the Gradle build. The formatting hook that fires on every edit in VS Code never ran. And the build command kept asking for permission, every single time.
Same repository, same Mac, same claude binary. My first guess was that each editor stored its own copy of the settings, so I kept opening and closing the plugin settings in Android Studio, looking for something that wasn't there.
It turned out the editor had nothing to do with it. The launch directory did. It took me the better part of an hour to see that — and the rest of the afternoon went into taking stock of where each settings file actually lives. If one of your editors is quietly ignoring your Claude Code settings, I hope this saves you some of that hour.
Every editor reads the same four files
The first thing worth knowing: Claude Code doesn't keep per-editor settings. The official settings page states that the terminal, the VS Code extension, the JetBrains plugin, and the desktop app all read the same settings files. The JetBrains plugin doesn't even bundle the CLI — it runs claude in the IDE's integrated terminal and connects to it.
| Scope | File | Who it affects |
|---|---|---|
| User | ~/.claude/settings.json | You, in every project on this machine |
| Shared project | .claude/settings.json | Everyone working in that folder (commit it to share) |
| Project local | .claude/settings.local.json | You, in that project only (kept out of git) |
| Managed | Deployed by your organization | Everyone the policy reaches |
Precedence runs Managed, then command-line --settings, then Project local, Shared project, and User. List keys such as permissions.allow merge across files instead of replacing each other.
So if something works in VS Code and not in Android Studio, there's no "Android Studio settings" to find. The real question is which file isn't being read from where you started.
The gap was where the session started
My repository keeps web-side notes and a .claude/settings.json at the root, while the Android project sits in an android/ subfolder. In VS Code I open the root. In Android Studio I open only android/, because that's where Gradle expects to be.
That's where an asymmetry in how the files are read comes in:
- Shared project (
.claude/settings.json) is read from the session's launch directory - Project local (
.claude/settings.local.json) is read from the repository root when you're inside a git repo (v2.1.211 and later)
Android Studio's terminal opens in android/, so the shared file at the root — the hook and the build allow rules with it — was never loaded. Meanwhile, every "don't ask again" approval I'd collected lived in the root-level local file, and those still applied. That's why everything looked half-working.
Checking this takes seconds. Inside Claude Code, open /status and read the Setting sources line, which lists each settings file loaded for the session. From VS Code, the shared project settings were in the list. From Android Studio, they weren't.
A script that lists what loads from a given folder
/status only helps after you've started a session. I wanted to check before opening an editor, so I wrote a small script: give it the folder you're about to launch from, and it shows which files will and won't be read.
#!/usr/bin/env bash
# claude-where-settings.sh
# Show which settings files Claude Code reads when started from a given folder
set -u
start="$(cd "${1:-$PWD}" && pwd -P)"
root="$(git -C "$start" rev-parse --show-toplevel 2>/dev/null || true)"
row() { # label file
if [ -f "$2" ]; then printf ' %-15s read %s\n' "$1" "$2"
else printf ' %-15s (none) %s\n' "$1" "$2"; fi
}
echo "launch dir : $start"
echo "repo root : ${root:-(not a git repo)}"
row "User" "$HOME/.claude/settings.json"
row "Shared project" "$start/.claude/settings.json"
# settings.local.json moves to the repo root inside git (v2.1.211+),
# but stays in the launch dir outside git or when the root is $HOME
local_dir="$start"
if [ -n "$root" ] && [ "$root" != "$HOME" ]; then local_dir="$root"; fi
row "Project local" "$local_dir/.claude/settings.local.json"
if [ "$local_dir" != "$start" ] && [ -f "$start/.claude/settings.local.json" ]; then
row "Local (legacy)" "$start/.claude/settings.local.json"
fi
# Warn only when the root has a shared file that this launch dir will miss
if [ -n "$root" ] && [ "$root" != "$start" ] \
&& [ -f "$root/.claude/settings.json" ] && [ ! -f "$start/.claude/settings.json" ]; then
echo "WARNING: $root/.claude/settings.json is not read from here (start at the root, or /cd there)"
exit 2
fi
exit 0Here's what it printed when I reproduced the layout and ran it from both the root and android/ (paths shortened to ~):
$ ./claude-where-settings.sh ~/dev/wallpaper-app
launch dir : ~/dev/wallpaper-app
repo root : ~/dev/wallpaper-app
User read ~/.claude/settings.json
Shared project read ~/dev/wallpaper-app/.claude/settings.json
Project local read ~/dev/wallpaper-app/.claude/settings.local.json
$ ./claude-where-settings.sh ~/dev/wallpaper-app/android
launch dir : ~/dev/wallpaper-app/android
repo root : ~/dev/wallpaper-app
User read ~/.claude/settings.json
Shared project (none) ~/dev/wallpaper-app/android/.claude/settings.json
Project local read ~/dev/wallpaper-app/.claude/settings.local.json
WARNING: ~/dev/wallpaper-app/.claude/settings.json is not read from here (start at the root, or /cd there)Two choices are worth explaining. First, the local file's location follows the documented rule: outside git, or when the repo root is your home directory, it stays in the launch directory. Second, the script exits with 2 only on the warning, so you can drop it into a pre-launch check or the top of another script as a single line.
There are other cases where the local file doesn't move to the root — on Windows, or when you don't own the root directory, for example. Treat this as a starting point for a personal Mac or Linux setup rather than a complete model.
Deciding what goes in which file
Once I understood the cause, my first move was to create android/.claude/settings.json and copy the root file into it. That was a mistake. The next week I fixed the hook at the root, forgot the copy, and was right back to one editor quietly ignoring it.
So I stopped copying and started giving each file a job:
| What | Where | Why |
|---|---|---|
| Personal preferences (theme, default model, allow rules I want everywhere) | ~/.claude/settings.json | Read no matter where you launch |
This repo's hooks, build allow rules, .env deny rules | Root .claude/settings.json | One source of truth; launch from the root so it loads |
| Temporary personal exceptions | .claude/settings.local.json | Lives at the root, so it applies even from a subfolder |
| Where the CLI lives | JetBrains Settings → Tools → Claude Code [Beta] → Claude command | Only needed, as an absolute path, when the IDE can't find claude |
One editor-specific difference deserves attention: where approvals are saved. In the CLI, "Yes, and don't ask again" always writes to the local file. The VS Code extension's approval card lets you pick the destination, and the shared .claude/settings.json is one of the options. Pick that in a hurry and a rule meant only for you ends up in a commit — I caught mine only when I read the diff.
One source of truth at the root, and every session starts there. That's the line I try to hold even on rushed days, because the copy is always the one that goes stale.
Three ways to start from the root in Android Studio
If you want to keep android/ open in Android Studio but run Claude Code from the root, you have three options:
cdto the root in the integrated terminal, then runclaude. If the plugin connection doesn't come up on its own, type/ideinside the session to connect. Diff viewing and selection sharing work as usual- Move the session with
/cdafter launch./cd ..moves the session to the root and re-reads both project files from there (v2.1.246 and later). You have to do it every launch, so I settled on option 1 as a habit - Open the root as the IDE project. The most direct route, but when the Android project lives in a subfolder, Gradle can behave differently, so I didn't go this way
Whichever you choose, a quick look at Setting sources in /status right after launch is reassuring. If the shared project settings appear there, the root .claude/settings.json is loaded.
If the JetBrains plugin itself won't start, or /ide can't find the IDE, that's a different problem — I walk through it in When Claude Code Is Installed but Nothing Happens in JetBrains IDEs. And once approvals have piled up in your local file, auditing the allow rules I kept saying yes to goes further, down to spotting the one risky line.
Before you open your editor next time
Try running pwd in each editor's integrated terminal and see where it starts. If the two answers differ, pass both to the script above and you'll know exactly which settings aren't being read.
I went back and forth through the plugin settings several times before I found that one-line difference. Check the launch directory before blaming the editor — that order now sits at the top of my notes as an indie developer juggling two IDEs.