Skip to content

Claude asks to trust /data/uploads at every start (Claude Code 2.1.327) #90

Done

Description

@nsleigh

What happens

With Claude Code 2.1.327, every new Claude session in the add-on (the first window and the session picker alike) stops at a trust question before it starts:

Adding a new directory:
/data/uploads
This session hasn't worked here before. Is this a directory you created or one you trust?
...
❯ No, exit
  Yes, add it

"Yes, add it" works, but the answer holds only for that session, so it comes back every time. "No, exit" ends the session.

Why

The add-on starts Claude with --add-dir /data/uploads (build_claude_flags in run.sh), so Claude can read files pasted, dropped or uploaded in the panel without asking. Claude Code 2.1.327 now asks whether to trust each --add-dir folder that has no trust record. Before that, the flag was enough.

Claude skips the question when the folder, or a folder above it, has projects[<path>].hasTrustDialogAccepted: true in ~/.claude.json (here /data/home/.claude.json). That's the record Claude writes when you accept its trust prompt, and Claude's own error messages suggest setting it.

Proposed fix

At start-up, run.sh records /data/uploads as trusted in ~/.claude.json with jq, before any Claude starts:

  • only /data/uploads, not /data, which also covers /data/home and the login;
  • the rest of the file is kept, and a file that isn't valid JSON is never rewritten;
  • uploads are written flat with cleaned-up, time-stamped names, so no .claude settings can appear in the folder.

I'm testing this on my own install and will open a PR if it works.

Workaround

Choose Yes, add it each time, or once, from a shell with no Claude running:

jq '.projects["/data/uploads"].hasTrustDialogAccepted = true' ~/.claude.json > /tmp/cj && cat /tmp/cj > ~/.claude.json

Activity

  1. added a commit that references this issue on Nov 18, 2026
    438728e
  2. ESJavadex commented on Nov 24, 2026

    @ESJavadex
    Owner

    Thanks for the detailed report and for testing your fix on Home Assistant, Neil. The fix is under review in #91. I've asked for a safer way to update Claude's config that also preserves an explicit trust choice. In 2.5.8, you can still choose “Yes, add it” when prompted. I'll keep this issue open until the fix lands.

  3. ESJavadex commented on Nov 25, 2026

    @ESJavadex
    Owner

    Thanks for the report and the Home Assistant testing, Neil. #91 is now on main. It records trust for /data/uploads only and preserves an explicit refusal. The regression tests also cover malformed config files and interrupted writes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions