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

[BUG] Frequent "logouts" when using devcontainers

Open Helmi opened this issue 6 months ago • 0 comments

Environment

  • Platform (select one):
    • [x] Anthropic API
  • Claude CLI version: 1.0.6
  • Operating System: macOS/Docker
  • Terminal: irrelevant

Bug Description

Claude code recently complains about missing API keys when using it in a devcontainer / docker setup. The ~/.claude directory is properly mapped inside the container. Even though the host is macOS the linux typical credential file gets generated and updated without issues, but still frequent logouts happen within the container.

Am I missing something here and maybe need to map additional files into the container? It runs for whole while but asks for login more than once a day.

Helmi avatar Jun 02 '25 08:06 Helmi