← Claude Code Hub
Oct 28, 2026 · 5 min read ✦ Tip #243

Claude Code keeps asking to trust the folder: home is never remembered

Claude Code asks you to trust the folder on every launch from your home directory, because that answer lasts one session. What gets saved, for which folder, and how to stop answering it.

Comparison in Claude Code: started in the home directory, the trust prompt comes back on every launch because the answer lasts only for the session and is never written to disk; started in a project folder, it asks once and saves the answer for the repository root and every subfolder

TL;DR If Claude Code asks you to trust the folder every time you open it, look at the path in the prompt: if it's your home directory, that answer is never saved. cd into the project before you type claude and it asks once. Don't set the home entry to true by hand: that trusts every folder under it.

Claude Code keeps workspace trust per directory, and it never saves it for your home directory. When you accept the prompt in a project, it writes hasTrustDialogAccepted: true for that path in ~/.claude.json and doesn't ask again. When you accept it in ~, it holds the answer for that session only, so the next launch starts from zero. The docs say it plainly: there is no setting to persist it. It isn't a bug, and hunting for an option won't fix it.

It hits hardest where every new terminal opens in home: a fresh tab on macOS or Linux, PowerShell on Windows. You type claude without a cd first, and the question is back.

The prompt that comes back

This is what Claude Code v2.1.312 shows when you start it in a home directory with no saved answer, captured in a scratch home (/home/dev) with empty settings:

 Accessing workspace:
 /home/dev
 Quick safety check: Is this a project you created or one you trust? (Like your own code, a
 well-known open source project, or work from your team). If not, take a moment to review what's in
 this folder first.
 Claude Code'll be able to read, edit, and execute files here.
 Security guide
 ❯ No, exit
   Yes, I trust this folder
 Enter to confirm · Esc to cancel

The option already selected is No, exit. Accept it in home, quit, and start again: the same screen, word for word.

What gets saved, and for which folder

After accepting the prompt once in home and once in a git repository at ~/code/api, this is what ~/.claude.json holds:

jq '.projects | map_values(.hasTrustDialogAccepted)' ~/.claude.json
{
  "/home/dev": false,
  "/home/dev/code/api": true
}

Home stays at false even though you said yes. The rest depends on where you start, tested on v2.1.312:

Where you start claude How often it asks What it saves
Your home directory Every launch Nothing, the entry stays false
Any folder inside a git repository, src/ included Once The repository root, so the whole repo is covered
A plain folder outside any repository Once That folder, and its subfolders stop asking
A git repository inside a folder you already trusted Once more, for that repo That repository's root
claude -p Never Nothing, and the project's allow rules stay ignored

Starting in src/ and saving the root is what you want: a repo trusted once stays trusted wherever you open it. The last row is why a project's .claude/settings.json rules seem not to work in a script, which the tip on permission prompts for chained commands covers.

How to stop answering it

1. Start Claude Code from the project folder

cd ~/code/api
claude

The first time it asks; from then on it doesn't, in that repo or any of its subfolders.

2. Make your terminal open where you work

If you always land in home, change the starting folder instead of the habit. In Windows Terminal, the profile setting is startingDirectory. In VS Code, the integrated terminal already opens in the workspace folder, so running claude there never hits the home case.

3. Trust a parent folder only if nothing unknown lives under it

Trusting a plain folder such as ~/code covers its subfolders that aren't repositories. Each repository inside still asks once, because a nested repo always needs its own answer.

4. Don't set home to true by hand

The docs show how to trust a folder by hand, projects["<path>"].hasTrustDialogAccepted in ~/.claude.json, for cases like claude -p. Done for home, it works on v2.1.312: the prompt disappears. But it also stopped asking in ~/other, a new folder with no answer of its own. Every folder under home that isn't a repository inherits that trust, an unzipped download included, and a parent folder's trust is enough for its hooks and env block to run. The repeated prompt is the price of not trusting everything you own at once.

5. If a project folder asks again, update

If the path in the prompt isn't home and you already accepted it, the saved answer was lost. Older versions lost it in three ways, fixed in the changelog:

  • v2.1.259: sessions running at the same time reverted each other's ~/.claude.json, so trust reset.
  • v2.1.284: started in home, the prompt appeared a second time after switching renderers or updating.
  • v2.1.299: on Linux, a sandboxed command that left an empty .config.json made sign-in, MCP servers and trust look lost.

Check your version with claude --version and run claude update. Then run the jq above to confirm the project path now holds true.

Official docs: Security: trust verification

Found this useful? See more of wmedia.es in your Google results.

Add wmedia.es as a preferred source on Google
FREE GUIDE

Approve less, but better.

Ten minutes in, you're hitting yes without reading. That's not review, that's prayer. A 10-page guide with the five levers in order of risk.

  • 1. Rules the first match wins
  • 2. Mode a dial, not a switch
  • 3. Auto mode a classifier approves for you
  • 4. Sandbox a fence the OS puts up
  • 5. Bypass only inside a container
Are you a professional Web developer?

It arrives by email · You join the Gravitas newsletter · Unsubscribe anytime

Claude Code permissions cheat sheet: approve less, keep control
FREE GUIDE

Approve less, but better.

Are you a professional Web developer? · Unsubscribe anytime
Workshop for teams

Multiply your team's output without sacrificing quality: a 6 to 8 hour AI First workshop, online, on the Claude platform.

See the workshop

Tired of approving permissions without reading?