[BUG] Claude credential refresh leaves dangling inode when mounting .credentials.json

Resolved 💬 3 comments Opened Jan 15, 2026 by Nintorac Closed Feb 28, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

I am mounting my ~/.claude/.credentials.json:ro file into a docker file to avoid having to reauthenticate every time.

When it comes time to token refresh I just send a quick message from the host to make it refresh.

When the refresh occurs the file update is not reflected in the container. Presumably claude is deleting and recreating the auth file leaving the container with a dangling inode.

What Should Happen?

Instead of a delete and create, the file should be updated in append mode. This will maintain the inode resulting in the update occurring within the container as well as outside

Error Messages/Logs

Steps to Reproduce

  1. mount credential in a dockerfile
  2. wait for token refresh
  3. refresh using the host
  4. the token isnt updated inside the container

Claude Model

None

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.7

Platform

Anthropic API

Operating System

Other Linux

Terminal/Shell

Other

Additional Information

_No response_

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗