{
  "id": 541323,
  "title": "Keep logged in to Claude between container builds",
  "url": "https://urgent.news/2026/08/11/keep-logged-in-to-claude-between-container-builds",
  "topic": "ai",
  "section": "AI",
  "published": "2026-08-11T07:08:14.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/sukkergris/keep-logged-in-to-claude-between-container-builds-430h"
  },
  "original_language": "en",
  "account": "For developers using the devcontainer setup with Claude, it's crucial to understand that running containers as root can lead to permission issues, particularly on macOS. By default, Docker creates named volumes, such as those for .claude and .continue, as the root user. When a non-root user, like container-user, attempts to write configuration files or save chat history in these directories, they encounter a \"Permission denied\" error.\n\nTo resolve this issue, the postCreateCommand in the devcontainer.json file triggers a post-container-install.sh script. This script is executed after the volumes are mounted and uses sudo chown to change the ownership of the volumes from root to the non-root user, container-user. By doing so, the script ensures that the volumes are owned by the container user, allowing for proper reading and writing permissions.\n\nThis solution is essential for maintaining the functionality of AI assistant extensions within the devcontainer setup. It guarantees that configurations and chat histories remain intact and writable, preventing the need to log into Claude between builds.",
  "summary": "This post is targeted devcontainer users not running the containers as root! \"remoteUser\" : \"root\" , # Not for you! In the end, this is basically a post about mounting folders and ensuring the right folder permissions - when not running with root permissions or as the root user. You probably have a setup looking something like this: devcontainer.json { \"name\" : \"Customer-Name - Dev machine -…",
  "key_points": [
    "Containers run as root cause permission issues on macOS.",
    "PostCreateCommand script changes ownership to non-root user.",
    "Ensures AI assistant extensions function without logging into Claude."
  ],
  "editors_take": "This solution ensures that AI assistant extensions within the devcontainer setup can maintain their configurations and chat histories, allowing developers to stay logged in to Claude between container builds.",
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}