Giving claude permission for /home/agent

Author: kmdespCreated Sep 11, 2026Updated Sep 11, 2026

I do not know if this is a new problem or I have misunderstood something. But when running

npx tsx .sandcastle/main.mts

I got the error

AgentError: claude-code exited with code 1: Ignoring 1 permissions.allow entry from .claude/settings.local.json: this workspace has not been trusted. Run Claude Code interactively here once and accept the trust dialog, or set projects["/home/agent/workspace"].hasTrustDialogAccepted: true in /home/agent/.claude.json.

I could solve it by creating a claude.json like this:

{ "projects": { "/home/agent/workspace": { "hasTrustDialogAccepted": true } } } and copying it into the Docker Image by adding a COPY statement in Dockerfile like this:

COPY --chown=agent:agent claude.json /home/agent/.claude.json