◉CLAUDE LABJP
●CC 2.1.332 — In 2.1.332 (11/25), skills from MCP servers show up in the / menu as server:skill (beta)●SONNET 4.5 — Sonnet 4.5 retires from the Claude API on 11/30, 4 days left. Move to claude-sonnet-5-5●/SHIP — Users report a custom ship skill hidden behind the new built-in /ship command●NEW — New: Before Sonnet 4.5 retires, compare the 3 places its answers change●GEMINI 2.5 — Using Gemini 2.5 alongside Claude? From 12/1 requests reroute to newer models at their rates. 5 days left●JETBRAINS — Our guide to using Claude Code from JetBrains IDEs is the most-read page right now●CC 2.1.332 — In 2.1.332 (11/25), skills from MCP servers show up in the / menu as server:skill (beta)●SONNET 4.5 — Sonnet 4.5 retires from the Claude API on 11/30, 4 days left. Move to claude-sonnet-5-5●/SHIP — Users report a custom ship skill hidden behind the new built-in /ship command●NEW — New: Before Sonnet 4.5 retires, compare the 3 places its answers change●GEMINI 2.5 — Using Gemini 2.5 alongside Claude? From 12/1 requests reroute to newer models at their rates. 5 days left●JETBRAINS — Our guide to using Claude Code from JetBrains IDEs is the most-read page right now
Articles/Claude Code
⟐ Claude Code/2026-11-26Beginner

My Hook Ran in VS Code but Never in Android Studio — Keep One Settings File and Start Claude Code at the Repo Root

Same repository, same Mac, yet hooks and allow rules only worked when Claude Code was opened from VS Code. The cause was the launch directory, not the editor. Here is a script that lists which settings files load from a given folder, plus how I decide what goes in which file.

Claude Code295JetBrainsAndroid StudioVS Code3settings.json11

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.

ScopeFileWho it affects
User~/.claude/settings.jsonYou, in every project on this machine
Shared project.claude/settings.jsonEveryone working in that folder (commit it to share)
Project local.claude/settings.local.jsonYou, in that project only (kept out of git)
ManagedDeployed by your organizationEveryone 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 0

Here'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:

WhatWhereWhy
Personal preferences (theme, default model, allow rules I want everywhere)~/.claude/settings.jsonRead no matter where you launch
This repo's hooks, build allow rules, .env deny rulesRoot .claude/settings.jsonOne source of truth; launch from the root so it loads
Temporary personal exceptions.claude/settings.local.jsonLives at the root, so it applies even from a subfolder
Where the CLI livesJetBrains Settings → Tools → Claude Code [Beta] → Claude commandOnly 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:

  1. cd to the root in the integrated terminal, then run claude. If the plugin connection doesn't come up on its own, type /ide inside the session to connect. Diff viewing and selection sharing work as usual
  2. Move the session with /cd after 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
  3. 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.

Share

Thank You for Reading

Claude Lab is ad-free, supported entirely by members like you. We publish practical guides daily with implementation code, benchmarks, and production-ready patterns. If you've found it useful, we'd love to have you on board.

  • ✦Copy-paste ready implementation code
  • ✦New advanced guides published daily
  • ✦$5/mo or $10 for lifetime access
View Membership →

If you found this article helpful, a small tip ($1.50) would mean a lot to us. Your support helps keep this site ad-free and covers server and hosting costs.

Related Articles

⟐ Claude Code2026-10-20
You Stepped Away and Came Back to a Summary — Spotting Idle Compaction and Keeping the Details You Can't Lose
Since v2.1.299, Claude Code compacts a long conversation after about 54 idle minutes. Here is how to tell it happened, how to tune or switch it off, and how to move the assumptions you can't afford to lose into CLAUDE.md.
⟐ Claude Code2026-10-19
If You Wrote MCP Allow Rules as Just `mcp__servername` — After v2.1.299, Only Servers With `__` in Their Names Need a Recheck
Claude Code v2.1.299 changed MCP allow rules to match only the server they name. A bare mcp__servername is affected only when the server name contains __ or ends in _. Includes a short audit script.
⟐ Claude Code2026-08-27
Curating the /model picker with modelPicker, and what replacing the lineup hides
Claude Code v2.1.242 added modelPicker, which lets you write the /model lineup yourself. Here is how appending differs from replacing, why project settings are ignored, and where it quietly narrows what availableModels allows.