◉CLAUDE LABJP
●CC 2.1.331 — 2.1.331 adds an API connectivity check to claude doctor and fixes MCP tool calls hanging for up to 30 minutes●SONNET 4.5 — Sonnet 4.5 retires from the Claude API on 11/30, 6 days left. Move to claude-sonnet-5-5●OFFICE — Users report the Microsoft 365 add-in disappearing seconds after install on macOS●NEW — New: Count how many input tokens one more tool costs with count_tokens●GEMINI 2.5 — Using Gemini 2.5 alongside Claude? From 12/1 requests reroute to newer models, billed at their rates. 7 days left●WORKBENCH — Trying the API in Workbench for the first time? Check the billing pages before you start●CC 2.1.331 — 2.1.331 adds an API connectivity check to claude doctor and fixes MCP tool calls hanging for up to 30 minutes●SONNET 4.5 — Sonnet 4.5 retires from the Claude API on 11/30, 6 days left. Move to claude-sonnet-5-5●OFFICE — Users report the Microsoft 365 add-in disappearing seconds after install on macOS●NEW — New: Count how many input tokens one more tool costs with count_tokens●GEMINI 2.5 — Using Gemini 2.5 alongside Claude? From 12/1 requests reroute to newer models, billed at their rates. 7 days left●WORKBENCH — Trying the API in Workbench for the first time? Check the billing pages before you start
Articles/Claude Code
⟐ Claude Code/2026-08-27Intermediate

Trusting the allow rules in your repo, or moving them to the environment

On disposable machines, the permissions.allow rules committed to your repo are dropped while the workspace waits to be trusted. Here is what gets dropped and what survives on 2.1.246, where each kind of rule belongs, and a preflight that catches the gap before a run starts.

Claude Code292permissions15settings.json10CI6automation110

✦ Premium Article

I opened the run log one morning and found an unfamiliar line sitting at the very top.

Ignoring 2 permissions.allow entries from .claude/settings.json: this workspace has not been trusted.

The job had not failed. The artifacts were there. But the permission rules I had committed to the repository — both of them — were never read.

As an indie developer I maintain a handful of apps and sites on my own, and the routine parts of that work run every night on a machine that is built from scratch each time. The environment is disposable; the repository is cloned fresh on every run. Putting the permission rules in the repo's .claude/settings.json was supposed to make the behavior identical no matter where it ran. That assumption was wrong.

The conclusion first: on disposable machines, treat permissions.allow in your repo as a nice-to-have. Put what you want blocked in deny, guarantee what you want permitted from the environment side, and detect the gap in a preflight before the run starts. What follows is how I got there, measured on Claude Code 2.1.246.

Which keys actually get dropped

I checked one key at a time. The method is dull: write a .claude/settings.json containing a single key, start one non-interactive session, and count the Ignoring lines printed at startup.

mkdir -p /tmp/probe/.claude && cd /tmp/probe
 
probe() {
  printf '%s' "$2" > .claude/settings.json
  echo "--- $1 ---"
  claude -p "hi" < /dev/null 2>&1 | grep '^Ignoring ' | sed 's/ Run Claude Code.*//'
}
 
probe "allow"                 '{"permissions":{"allow":["Bash(git *)"]}}'
probe "deny"                  '{"permissions":{"deny":["Bash(rm *)"]}}'
probe "ask"                   '{"permissions":{"ask":["Bash(git push *)"]}}'
probe "additionalDirectories" '{"permissions":{"additionalDirectories":["/tmp/other"]}}'
probe "hooks"                 '{"hooks":{"PreToolUse":[{"matcher":"Bash","hooks":[{"type":"command","command":"echo hi"}]}]}}'

Keep the < /dev/null. Without it each probe waits several seconds for stdin, and ten probes turn into a coffee break.

Here is what I got.

SettingUntrusted workspaceStartup output
permissions.allowdroppedIgnoring N permissions.allow entries…
permissions.additionalDirectoriesdroppedIgnoring N permissions.additionalDirectories entries…
permissions.denyhonorednothing printed
permissions.askhonorednothing printed
hooks / env / statusLine / modelhonorednothing printed

The keys that get dropped are exactly the ones that would be dangerous coming from a stranger. allow says "run this without asking me" and additionalDirectories says "you may touch this too" — adopting either from a repository you have not vetted is a real risk. deny and ask only make things stricter, so there is no reason to discard them.

The design is coherent. But if you have not internalized the asymmetry, and you assume permissions simply work when placed in settings.json, what you actually get is a state where only the loosening half of your configuration has quietly vanished.

One detail for parsing: each dropped key gets its own line, and the wording switches between entry and entries depending on the count. Counting lines is more reliable than matching the number.

It will never become trusted on its own

My first assumption was that the warning would appear once and then sort itself out after a few runs. It does not.

Run once in an untrusted directory, then look at the user config:

claude -p "hi" < /dev/null > /dev/null 2>&1
python3 -c "import json,os;print(json.load(open(os.path.expanduser('~/.claude.json'))).get('projects',{}))"

The output was {}. An untrusted non-interactive run does not even create an entry for the directory. It is not recorded with the trust flag set to false — there is no record at all.

Nothing moves forward on its own. Every nightly run drops the same rules at the same point, forever. And because the artifacts still appear, you will not notice unless you read back to the first line of the log.

That is the uncomfortable part. A broken configuration would stop; this one completes successfully with one capability quietly removed. It rhymes with the way a typo in a settings key is ignored without a word (A One-Letter Typo in settings.json Is Ignored Without a Single Warning). The difference is that this failure does leave you one line of evidence. Whether you can pick that line up mechanically is what decides the outcome.

✦

Thank you for reading this far.

Continue Reading

What follows includes implementation code, benchmarks, and practical content we hope you'll find useful. This site runs without ads — server and development costs are supported entirely by members like you. If it's been helpful, we'd be truly grateful for your support.

WHAT YOU'LL LEARN
✦You will be able to tell whether the permission rules in your repo are actually in effect, from a single startup's worth of output
✦You will be able to stop a disposable environment from running for days with its allow rules silently discarded, by catching it in a preflight
✦You will be able to decide where each rule belongs, knowing which side of the permission config survives an untrusted workspace
Secure payment via Stripe · Cancel anytime
✦

Unlock This Article

Get full access to the rest of this article. Buy once, read anytime. This site is ad-free — your support goes directly toward keeping it running.

or
Unlock all articles with Membership →
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 →

Related Articles

⟐ Claude Code2026-11-08
Before a Nightly Job Hangs on a Prompt: Designing Around denyInsteadOfPrompting
Claude Code 2.1.319 adds permissions.denyInsteadOfPrompting. Here is how it compares with other ways to answer permission prompts unattended, and how to catch what a denial quietly drops.
⟐ 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-25
A One-Letter Typo in settings.json Is Ignored Without a Single Warning
I diffed claude doctor output between a settings.json with misspelled keys and a correct one. There was no difference at all. Here is what actually gets validated, what slips through, and a small check that catches typos before they cost you a day.