claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

Claude now seems to forget that we allow "Do you trust the files in this folder?"

Open balheru opened this issue 6 months ago • 4 comments

Every time that i start a new claude session in a previously approved folder, it will always ask to trust the folder. Is it possible to either fix this, or allow some mechanism to disable, or whitelist some folders?

balheru avatar Jun 16 '25 12:06 balheru

Do you also get the prompt to set your theme? If so, we are mistakenly failing to load your settings. If not, we'll need to debug some more.

wolffiex avatar Jun 17 '25 23:06 wolffiex

I do not have the theme situation going on. any debug logs I can give to you? ( it would be cool to permanently set some configs for this )

balheru avatar Jun 17 '25 23:06 balheru

After a bit of messing around:

  • in the home folder "/Users/balheru" if i reconnect to a session it does not ask me for permissions if i previously approved
  • in the home folder if i start a new session, it will ask me for permissions, regardless if i approve before
  • in any other folder if i approve once it never asks me again.

balheru avatar Jun 21 '25 12:06 balheru

Yeah would like to know how to fix this for the home folder, often launch claude there when I just want to do some random things

JDaance avatar Jun 27 '25 10:06 JDaance

I didn't have this issue before, but this has now become a reoccurring issue in v1.0.81 (I believe the first version this happened at was v1.0.77). For me, this only happens in subdirectories of my github root directory. For some reason, it does remember to trust the root directory project.

duckSquirrelPilot avatar Aug 16 '25 21:08 duckSquirrelPilot

I suspect the reproduction steps here might be related to running claude inside a subdirectory (not at the Git repository root) combined with using statusline.

For example, my setup looks like this:

/  # Root of the Git repository
├── .git/
└── sub/  # Run the `claude` command in this directory
    └── .claude/
        └── settings.json

When I launch claude inside sub/, together with statusline, I can reproduce the issue. Could this be the actual cause?

settings.json:

{
  "statusLine": {
    "type": "command",
    "command": "echo statusline"
  }
}

KoharaKazuya avatar Aug 17 '25 03:08 KoharaKazuya

Not using statusLine, but I am using a subdirectory of my git repository, and I get this prompt on every Claude launch. Mine looks like this:

/  # Root of the Git repository
├── .git/
└── sub/actually/a/few  # Run the `claude` command in this directory
    └── .claude/
        └── settings.local.json

My settings.local.json:

{
  "permissions": {
    "allow": [
      "Bash(bundle exec rspec:*)",
      "Bash(bundle exec rails:*)"
    ],
    "deny": []
  },
  "hooks": {
    "PostToolUse": [
      {
        "matcher": "Edit|MultiEdit|Write",
        "hooks": [
          {
            "type": "command",
            "command": "./.claude/format-file.sh"
          }
        ]
      }
    ]
  }
}

CGamesPlay avatar Aug 29 '25 08:08 CGamesPlay

Facing the same issue on linux, its not asking me everytime on launch if i trust a folder unless i explicitly have a claude.md in that dir

teito-dev avatar Sep 15 '25 03:09 teito-dev