<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:media="http://search.yahoo.com/mrss/">
  <channel>
    <title>Secrets Management · Jared Lynskey</title>
    <link>https://jared.lynskey.co.nz/en/tags/secrets-management/</link>
    <description>Short stories of value on software engineering and engineering leadership — performance reviews, hiring and scaling teams, CI/CD, DevOps monitoring and agentic AI. Written from Seoul.</description>
    <generator>Hugo</generator>
    <language>en</language>
    <copyright>© 2026 Jared Lynskey</copyright>
    <lastBuildDate>Tue, 24 Nov 2026 00:00:00 +1300</lastBuildDate>
    <atom:link href="https://jared.lynskey.co.nz/en/tags/secrets-management/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Claude Code settings.local.json vs settings.json, Explained</title>
      <link>https://jared.lynskey.co.nz/en/posts/2026/claude-code-settings/</link>
      <guid isPermaLink="true">https://jared.lynskey.co.nz/en/posts/2026/claude-code-settings/</guid>
      <pubDate>Tue, 24 Nov 2026 00:00:00 +1300</pubDate>
      <dc:creator>Jared Lynskey</dc:creator>
      <category>Claude Code</category>
      <category>AI Agents</category>
      <category>Security</category>
      <category>Secrets Management</category>
      <category>Privacy</category>
      <category>Git</category>
      <category>Docker</category>
      <category>Developer Tools</category>
      <description>settings.json is shared and settings.local.json is yours, and &#34;Don&#39;t ask again&#34; saves rules there, secrets included. Precedence, privacy, and how to check.</description>
      <content:encoded><![CDATA[<p>Claude Code reads its settings from four places. A project&rsquo;s <code>.claude/settings.json</code> is shared: you commit it so everyone working on the repository gets the same permission rules, hooks and plugins. <code>.claude/settings.local.json</code> is yours alone for that project, and Claude Code keeps it out of git. <code>~/.claude/settings.json</code> is yours in every project, and managed settings come from your organisation and beat all of them. When you answer a permission prompt with &ldquo;Yes, and don&rsquo;t ask again&rdquo;, the new rule goes into <code>settings.local.json</code>, written exactly as the command was. If the command had a password in it, the password is now sitting in a plain JSON file.</p>
<p>That last part was news this month. On 5 November, <a href="https://apiiro.com/blog/coding-agents-leaking-secrets-github-dont-ask-again"  target="_blank" rel="noreferrer">Apiiro</a> reported finding 1,122 <code>settings.local.json</code> files in public GitHub repositories that held a real secret, 1,379 distinct ones in total. GitGuardian&rsquo;s numbers, <a href="https://www.csoonline.com/article/4247336/claude-codes-dont-ask-again-button-has-a-secrets-spilling-problem.html"  target="_blank" rel="noreferrer">reported by CSO</a>, are bigger: 31,088 distinct secrets in these files across 23,276 public repositories, 5,343 of them still valid when found. The <a href="https://news.ycombinator.com/item?id=50407882"  target="_blank" rel="noreferrer">Hacker News thread</a> was mostly people going to check their own repositories, so I did the same with every settings file on my laptop. The results are further down. First, what each file is for.</p>

<h2 class="relative group">Which file is for what
    <div id="which-file-is-for-what" class="anchor"></div>
    
    <span
        class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none">
        <a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#which-file-is-for-what" aria-label="Anchor">#</a>
    </span>
    
</h2>
<table>
	<thead>
			<tr>
					<th>File</th>
					<th>Who it affects</th>
					<th>Commit it?</th>
					<th>What I keep in it</th>
			</tr>
	</thead>
	<tbody>
			<tr>
					<td><code>~/.claude/settings.json</code></td>
					<td>You, in every project on this machine</td>
					<td>No, it isn&rsquo;t in a project</td>
					<td>Default model, permission mode, hooks I want everywhere, privacy variables</td>
			</tr>
			<tr>
					<td><code>.claude/settings.json</code></td>
					<td>Everyone who works in the project</td>
					<td>Yes</td>
					<td>The team&rsquo;s allow and deny rules, project hooks, plugins, the <code>env</code> the project needs</td>
			</tr>
			<tr>
					<td><code>.claude/settings.local.json</code></td>
					<td>You, in this project only</td>
					<td>No, Claude Code keeps it out of git</td>
					<td>Personal overrides, and every &ldquo;don&rsquo;t ask again&rdquo; approval</td>
			</tr>
			<tr>
					<td>Managed settings</td>
					<td>Everyone your organisation deploys them to</td>
					<td>Not yours to edit</td>
					<td>Security policy</td>
			</tr>
	</tbody>
</table>
<p>Claude Code also keeps <code>~/.claude.json</code>, which holds your account details, MCP server configuration and per-project state such as which folders you&rsquo;ve trusted. You don&rsquo;t need to edit it, and it&rsquo;s not a settings file in the sense above.</p>
<p>The local file is created the first time you give a standing approval. Choose &ldquo;Yes, and don&rsquo;t ask again&rdquo; for a Bash command and Claude Code writes the rule into <code>.claude/settings.local.json</code> at the root of the git repository, even if you started the session in a subfolder.</p>

<h2 class="relative group">Which one wins
    <div id="which-one-wins" class="anchor"></div>
    
    <span
        class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none">
        <a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#which-one-wins" aria-label="Anchor">#</a>
    </span>
    
</h2>
<p>When the same key is set in more than one place, the higher level wins:</p>
<ol>
<li>Managed settings</li>
<li><code>--settings</code> on the command line, for that session only</li>
<li><code>.claude/settings.local.json</code></li>
<li><code>.claude/settings.json</code></li>
<li><code>~/.claude/settings.json</code></li>
</ol>
<p>So your local file beats the team&rsquo;s file, and the team&rsquo;s file beats your personal defaults. That&rsquo;s the order for single values like <code>model</code>. Lists behave differently. <code>permissions.allow</code>, <code>permissions.deny</code> and the other list keys merge across all the files instead of the highest one replacing the rest, so every file can add rules and none can quietly delete another&rsquo;s.</p>
<p>Permission rules then have their own order, which matters more than the file order. Claude Code checks deny rules first, then ask rules, then allow rules, and the first match decides. A deny rule anywhere beats an allow rule anywhere, and an allow rule can&rsquo;t carve an exception out of a deny. The <code>/permissions</code> command shows every rule in effect and which file it came from, which is the quickest way to see what you&rsquo;ve accumulated.</p>

<h2 class="relative group">What &ldquo;don&rsquo;t ask again&rdquo; actually saves
    <div id="what-dont-ask-again-actually-saves" class="anchor"></div>
    
    <span
        class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none">
        <a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#what-dont-ask-again-actually-saves" aria-label="Anchor">#</a>
    </span>
    
</h2>
<p>For a Bash command, the prompt offers to remember a prefix: &ldquo;Yes, and don&rsquo;t ask again for: <code>npm test *</code>&rdquo;. Approve it and that rule lands in the local file. It&rsquo;s permanent for that repository until you remove it.</p>
<p>The trouble is that the prefix is whatever came first in the command, and sometimes that includes a secret. Approve this:</p>
<div class="highlight-wrapper"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="nv">PGPASSWORD</span><span class="o">=</span><span class="s1">&#39;s3cret-example&#39;</span> pg_dump -h db.example.com -U app mydb &gt; backup.sql</span></span></code></pre></div></div>
<p>and the rule that gets saved is along these lines:</p>
<div class="highlight-wrapper"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-json" data-lang="json"><span class="line"><span class="cl"><span class="p">{</span>
</span></span><span class="line"><span class="cl">  <span class="nt">&#34;permissions&#34;</span><span class="p">:</span> <span class="p">{</span>
</span></span><span class="line"><span class="cl">    <span class="nt">&#34;allow&#34;</span><span class="p">:</span> <span class="p">[</span>
</span></span><span class="line"><span class="cl">      <span class="s2">&#34;Bash(PGPASSWORD=&#39;s3cret-example&#39; pg_dump *)&#34;</span>
</span></span><span class="line"><span class="cl">    <span class="p">]</span>
</span></span><span class="line"><span class="cl">  <span class="p">}</span>
</span></span><span class="line"><span class="cl"><span class="p">}</span></span></span></code></pre></div></div>
<p>The same goes for an API key in a <code>curl</code> header, a token passed as a flag, or a connection string with the password in it. Nothing about the prompt makes that obvious, because you&rsquo;re looking at the command, not at the JSON it will turn into.</p>
<p>Two other details are worth knowing. Approving a compound command such as <code>git status &amp;&amp; npm test</code> saves a separate rule for each part that needed approval, not one rule for the whole line. And &ldquo;don&rsquo;t ask again&rdquo; for file edits isn&rsquo;t permanent at all. It lasts until the end of the session.</p>

<h2 class="relative group">Why &ldquo;don&rsquo;t ask again&rdquo; sometimes doesn&rsquo;t stick
    <div id="why-dont-ask-again-sometimes-doesnt-stick" class="anchor"></div>
    
    <span
        class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none">
        <a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#why-dont-ask-again-sometimes-doesnt-stick" aria-label="Anchor">#</a>
    </span>
    
</h2>
<p>If you approved something and Claude Code keeps asking, the usual cause is an ask rule somewhere else. Ask rules are checked before allow rules, so an ask rule in the project&rsquo;s or your organisation&rsquo;s settings prompts even though your local file allows the command.</p>
<p>The next most likely is that the command doesn&rsquo;t match the saved prefix. <code>npm test *</code> doesn&rsquo;t cover <code>npx jest</code>, and a rule for <code>pnpm build</code> doesn&rsquo;t cover <code>cd web &amp;&amp; pnpm build</code> unless <code>cd web</code> is allowed too, because every part of a compound command has to be allowed. If it was a file edit, the approval ended with the session. And sometimes the prompt never offered a standing approval in the first place: Claude Code only shows &ldquo;don&rsquo;t ask again&rdquo; when the prompt can show everything the rule would allow, and otherwise you get a one-time yes.</p>
<p>People searching for how to &ldquo;allow all&rdquo; in <code>settings.local.json</code> will find that you can&rsquo;t any more. <code>bypassPermissions</code> and <code>auto</code> as a <code>defaultMode</code> don&rsquo;t take effect from project or local settings. Set them in <code>~/.claude/settings.json</code>, or pass <code>--permission-mode</code> for one session. I wrote about <a href="https://jared.lynskey.co.nz/en/posts/2026/2026-10-22-claude-code-day-to-day/" >which mode I use and why</a> last month.</p>

<h2 class="relative group">What I found on my own laptop
    <div id="what-i-found-on-my-own-laptop" class="anchor"></div>
    
    <span
        class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none">
        <a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#what-i-found-on-my-own-laptop" aria-label="Anchor">#</a>
    </span>
    
</h2>
<p>I wrote a short script to read every Claude Code settings file under my home folder and count, without printing the rules themselves:</p>
<ul>
<li>21 settings files across my projects and my home folder.</li>
<li>395 allow rules, 9 deny rules and no ask rules. All nine deny rules are in one project, added this month, and they stop the agent editing its own settings and instructions.</li>
<li>26 allow rules let through a whole interpreter or network tool, such as <code>python3</code>, <code>curl</code>, <code>ssh</code> or <code>docker</code>. As I said in <a href="https://jared.lynskey.co.nz/en/posts/2026/2026-10-22-agentic-ai-security/" >the agent security post</a>, an allowlist with an interpreter in it is an allow-all with extra steps.</li>
<li>3 rules held a database password inline, two different passwords, all in my estimating app&rsquo;s project. Two more rules matched the word &ldquo;secret&rdquo; but were only <code>fly secrets list</code>, which is why it&rsquo;s worth reading what a grep finds rather than trusting the count.</li>
<li>Every <code>settings.local.json</code> inside a git repository was ignored by git, and none had ever been committed.</li>
</ul>
<p>When I wrote that security post in October, I found and removed two rules with credentials in them. This check found three more. The approvals happen in the middle of real work, one click at a time, and the file is never somewhere you look. I&rsquo;ve since moved both passwords into <code>~/.pgpass</code>, and the rules now read <code>Bash(pg_dump *)</code>.</p>
<p>The session logs are the other half. Claude Code keeps each session&rsquo;s transcript in plain text under <code>~/.claude/projects/</code>, for 30 days by default (<code>cleanupPeriodDays</code> changes that). A crude grep flagged 41 of the 210 transcripts on my laptop, but almost all of those were placeholders like <code>password</code> in example connection strings. With those excluded, 4 still held something that looks like a real credential: three database passwords and a GitHub token. That&rsquo;s fewer than I feared. The logs don&rsquo;t leave the machine on their own, but anything else running on it can read them.</p>

<h2 class="relative group">Where the gitignore safeguard doesn&rsquo;t reach
    <div id="where-the-gitignore-safeguard-doesnt-reach" class="anchor"></div>
    
    <span
        class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none">
        <a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#where-the-gitignore-safeguard-doesnt-reach" aria-label="Anchor">#</a>
    </span>
    
</h2>
<p>The first time Claude Code writes <code>settings.local.json</code> in a repository that doesn&rsquo;t already ignore it, it adds <code>**/.claude/settings.local.json</code> to your global git excludes file, which is <code>~/.config/git/ignore</code> unless you&rsquo;ve set <code>core.excludesFile</code>. That&rsquo;s why none of mine were committed. You can see which line is doing the ignoring:</p>
<div class="highlight-wrapper"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">$ git check-ignore -v .claude/settings.local.json
</span></span><span class="line"><span class="cl">/Users/me/.config/git/ignore:1:**/.claude/settings.local.json	.claude/settings.local.json</span></span></code></pre></div></div>
<p>But that line only affects git, and only on your machine. I tested two other ways a project folder leaves a laptop, in a throwaway folder with a fake password in the rule.</p>
<p><code>npm pack --dry-run</code> (npm 11.6.2) listed <code>.claude/settings.local.json</code> in the package. npm reads a package&rsquo;s own <code>.gitignore</code> or <code>.npmignore</code>, not your global excludes file, so a package published from that folder would have shipped the file.</p>
<p><code>docker build</code> with <code>COPY . /app</code> copied it into the image too. Docker only reads <code>.dockerignore</code>. That one isn&rsquo;t hypothetical: GitGuardian found 613 distinct secrets from Claude Code settings files in public Docker Hub images.</p>
<p>The other gaps are the ones the docs mention: a <code>settings.local.json</code> you created by hand doesn&rsquo;t get the global excludes line until Claude Code writes to it, and <code>git add -f</code> adds it regardless. So I&rsquo;d ignore it in the project as well:</p>
<div class="highlight-wrapper"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="c1"># .gitignore and .dockerignore</span>
</span></span><span class="line"><span class="cl">.claude/settings.local.json</span></span></code></pre></div></div>
<p>For an npm package, a <code>files</code> list in <code>package.json</code> is the safer fix, because it&rsquo;s an allowlist and nothing outside it gets published.</p>

<h2 class="relative group">How to check your own repositories
    <div id="how-to-check-your-own-repositories" class="anchor"></div>
    
    <span
        class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none">
        <a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#how-to-check-your-own-repositories" aria-label="Anchor">#</a>
    </span>
    
</h2>
<p>Find every settings file:</p>
<div class="highlight-wrapper"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">find ~ -path <span class="s1">&#39;*/.claude/settings*.json&#39;</span> -not -path <span class="s1">&#39;*/node_modules/*&#39;</span> 2&gt;/dev/null</span></span></code></pre></div></div>
<p>In each repository, check whether the local file is tracked now or was ever committed:</p>
<div class="highlight-wrapper"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">git ls-files -- <span class="s1">&#39;*.claude/settings.local.json&#39;</span>
</span></span><span class="line"><span class="cl">git log --all --oneline -- <span class="s1">&#39;*.claude/settings.local.json&#39;</span></span></span></code></pre></div></div>
<p>And look for rules that carry a secret:</p>
<div class="highlight-wrapper"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">jq -r <span class="s1">&#39;.permissions.allow[]?&#39;</span> .claude/settings.local.json <span class="se">\
</span></span></span><span class="line"><span class="cl">  <span class="p">|</span> grep -Ei <span class="s1">&#39;pass(word)?=|token|secret|api[_-]?key|bearer|://[^/@ ]+:[^/@ ]+@&#39;</span></span></span></code></pre></div></div>
<p>If anything turns up in a repository that&rsquo;s public, or ever was, rotate the credential first. Removing the file from the next commit doesn&rsquo;t remove it from history, and anyone who cloned the repository already has it. After rotating, <code>git rm --cached .claude/settings.local.json</code>, add it to <code>.gitignore</code>, and rewrite history if you need the old commits clean.</p>

<h2 class="relative group">Keep the secret out of the command
    <div id="keep-the-secret-out-of-the-command" class="anchor"></div>
    
    <span
        class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none">
        <a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#keep-the-secret-out-of-the-command" aria-label="Anchor">#</a>
    </span>
    
</h2>
<p>The real fix is to never type a credential into a command an agent runs, so there&rsquo;s nothing for a rule to capture. For Postgres, a <code>~/.pgpass</code> file (mode 600) means <code>pg_dump</code> finds the password itself, and the rule becomes <code>Bash(pg_dump *)</code>. For everything else, load secrets as environment variables from a secrets manager or the system keychain before the session starts, and refer to them by name. A rule that says <code>curl -H &quot;Authorization: Bearer $API_TOKEN&quot;</code> is harmless, and one with the token pasted in isn&rsquo;t.</p>
<p>Then stop Claude Code reading the files where secrets live. These rules go in <code>~/.claude/settings.json</code> so they apply in every project:</p>
<div class="highlight-wrapper"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-json" data-lang="json"><span class="line"><span class="cl"><span class="p">{</span>
</span></span><span class="line"><span class="cl">  <span class="nt">&#34;permissions&#34;</span><span class="p">:</span> <span class="p">{</span>
</span></span><span class="line"><span class="cl">    <span class="nt">&#34;deny&#34;</span><span class="p">:</span> <span class="p">[</span>
</span></span><span class="line"><span class="cl">      <span class="s2">&#34;Read(**/.env)&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">      <span class="s2">&#34;Read(**/.env.*)&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">      <span class="s2">&#34;Read(**/secrets/**)&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">      <span class="s2">&#34;Read(~/.pgpass)&#34;</span>
</span></span><span class="line"><span class="cl">    <span class="p">]</span>
</span></span><span class="line"><span class="cl">  <span class="p">}</span>
</span></span><span class="line"><span class="cl"><span class="p">}</span></span></span></code></pre></div></div>
<p>Bare patterns like <code>**/.env</code> match under whichever project you start Claude Code in, which is what you want here. A <code>Read</code> deny rule covers Claude&rsquo;s file tools (Read, Grep, Glob), not whatever a shell command opens, so it won&rsquo;t stop <code>cat .env</code> on its own. Keep <code>cat</code> and interpreters out of your allow rules too, or run with the sandbox on.</p>

<h2 class="relative group">Privacy settings worth knowing
    <div id="privacy-settings-worth-knowing" class="anchor"></div>
    
    <span
        class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none">
        <a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#privacy-settings-worth-knowing" aria-label="Anchor">#</a>
    </span>
    
</h2>
<p>What happens to your conversations depends on the account. On a consumer plan (Free, Pro, Max and Ultra), Anthropic may use your chats and coding sessions to train future models if the &ldquo;help improve Claude&rdquo; setting is on. You change it at <a href="https://claude.ai/settings/data-privacy-controls"  target="_blank" rel="noreferrer">claude.ai/settings/data-privacy-controls</a>. With it on, data is kept for five years; with it off, 30 days. On Team, Enterprise or the API, Anthropic doesn&rsquo;t train on your code or prompts unless your organisation opts in, and standard retention is 30 days.</p>
<p>Separately, Claude Code sends operational telemetry: usage metrics, and error reports on Pro, Max and Ultra sign-ins. The <a href="https://code.claude.com/docs/en/data-usage"  target="_blank" rel="noreferrer">data usage page</a> says metrics never include code, prompts or file paths, and error reports are redacted before they leave. You can switch them off in the <code>env</code> block of your user settings:</p>
<div class="highlight-wrapper"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-json" data-lang="json"><span class="line"><span class="cl"><span class="p">{</span>
</span></span><span class="line"><span class="cl">  <span class="nt">&#34;env&#34;</span><span class="p">:</span> <span class="p">{</span>
</span></span><span class="line"><span class="cl">    <span class="nt">&#34;DISABLE_TELEMETRY&#34;</span><span class="p">:</span> <span class="s2">&#34;1&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">    <span class="nt">&#34;DISABLE_ERROR_REPORTING&#34;</span><span class="p">:</span> <span class="s2">&#34;1&#34;</span>
</span></span><span class="line"><span class="cl">  <span class="p">}</span>
</span></span><span class="line"><span class="cl"><span class="p">}</span></span></span></code></pre></div></div>
<p><code>CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1</code> turns off both, plus the feedback survey, in one go. Turning telemetry off also turns off feature flags, which can make features such as Remote Control unavailable. And <code>/feedback</code> sends a copy of the conversation, code included, so check what&rsquo;s in a session before you report a bug from it.</p>
<p>The other story this month was an <a href="https://github.com/anthropics/claude-code/issues/107757"  target="_blank" rel="noreferrer">open GitHub issue</a> reporting that Claude Code put the user&rsquo;s account email address in the <code>User-Agent</code> header of requests to third-party websites. Anthropic replied that a built-in mod blocks it from version 2.1.317, on by default and visible under <code>/plugins</code>, and a later comment reported a gap with <code>curl</code> run from Bash. If that matters to you, check the issue for the current state before relying on either.</p>

<h2 class="relative group">The short version
    <div id="the-short-version" class="anchor"></div>
    
    <span
        class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none">
        <a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#the-short-version" aria-label="Anchor">#</a>
    </span>
    
</h2>
<p><code>settings.json</code> in a project is the team&rsquo;s file and belongs in git. <code>settings.local.json</code> is yours, stays out of git, and collects every &ldquo;don&rsquo;t ask again&rdquo; approval word for word, including any password that was in the command. Lists such as <code>permissions.allow</code> merge across files, deny beats ask beats allow, and <code>/permissions</code> shows the lot. Git&rsquo;s global excludes keep the local file out of commits, but not out of npm packages or Docker images, so ignore it in the project too. Keep secrets out of commands entirely, deny reads of the files that hold them, and check the privacy setting on your account rather than assuming you know what it is.</p>

<h2 class="relative group">Further reading
    <div id="further-reading" class="anchor"></div>
    
    <span
        class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none">
        <a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#further-reading" aria-label="Anchor">#</a>
    </span>
    
</h2>
<p><strong>On this site:</strong></p>
<ul>
<li><a href="https://jared.lynskey.co.nz/en/posts/2026/2026-10-22-claude-code-day-to-day/" >How I Run Claude Code Day to Day</a>, on permission modes and the one I use</li>
<li><a href="https://jared.lynskey.co.nz/en/posts/2026/2026-10-22-agentic-ai-security/" >Agentic AI Security</a>, on what my agents can reach and who gets to instruct them</li>
</ul>
<p><strong>Elsewhere:</strong></p>
<ul>
<li><a href="https://code.claude.com/docs/en/settings"  target="_blank" rel="noreferrer">Settings files and precedence</a> and <a href="https://code.claude.com/docs/en/permissions"  target="_blank" rel="noreferrer">Configure permissions</a> in the Claude Code docs</li>
<li><a href="https://code.claude.com/docs/en/data-usage"  target="_blank" rel="noreferrer">Data usage</a>, for training, retention and telemetry</li>
<li><a href="https://apiiro.com/blog/coding-agents-leaking-secrets-github-dont-ask-again"  target="_blank" rel="noreferrer">Apiiro&rsquo;s report</a> on secrets in public <code>settings.local.json</code> files, and <a href="https://www.csoonline.com/article/4247336/claude-codes-dont-ask-again-button-has-a-secrets-spilling-problem.html"  target="_blank" rel="noreferrer">CSO&rsquo;s write-up of GitGuardian&rsquo;s numbers</a></li>
</ul>
]]></content:encoded>
      <media:content url="https://jared.lynskey.co.nz/en/posts/2026/claude-code-settings/featured.jpg" medium="image" type="image/jpeg" />
    </item>
  </channel>
</rss>
