Expand description
Who owns, and who can read, the credentials inside a container agent.
The bound account’s .credentials.json is a single-file bind of a host file, so what a
container sees of it is whatever the host presents: a Linux host shows its own owner and
mode, Docker Desktop shows a synthesized root-owned rwxrwxrwx. The agent’s ~/.claude
volume is created from the image. When a container starts (or has been restarted since it was
last looked at) a root exec tightens what is the turn user’s: ~/.claude and its top-level
files to the agent alone, and the credentials file to 600. A credentials file that root owns is
handed to the turn user first, unless the container runs in a user namespace (rootless Docker or
Podman), where root is the host user. One owned by a real host user is left exactly as it is: through the
bind a chown would change the host’s file, and a chmod 600 could lock the agent out of a file
it can read today. It then reads the file back, and says in the log what it is.