From 18b2a1307092ce1c7f51117c1291d8c7fba27263 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Wed, 25 Mar 2026 09:49:12 -0400 Subject: [PATCH] Fix HOME defaulting to CWD inside container (#36) With --userns=keep-id, the host UID has no /etc/passwd entry in the container, so podman defaults HOME to the working directory. This causes several problems: - ~/.claude resolves to $CWD/.claude instead of the mounted config dir - Node.js os.homedir() === process.cwd(), so Claude Code treats every workspace as "running from home directory" - Workspace trust acceptance is only session-scoped (never persisted), causing the "trust this folder?" dialog on every launch Explicitly set HOME=/home/node (the Dockerfile's user home with shell configs) so that HOME is stable regardless of workspace. Claude Code's config is found via CLAUDE_CONFIG_DIR which is already set independently. Co-Authored-By: Claude Code 2.1.81 / Claude Opus 4.6 --- bin/yolo | 1 + 1 file changed, 1 insertion(+) diff --git a/bin/yolo b/bin/yolo index 70a6cac..9405480 100755 --- a/bin/yolo +++ b/bin/yolo @@ -457,6 +457,7 @@ podman run --log-driver=none -it --rm \ -v "$WORKSPACE_MOUNT" \ "${WORKTREE_MOUNTS[@]}" \ -w "$WORKSPACE_DIR" \ + -e HOME=/home/node \ -e CLAUDE_CONFIG_DIR="$CLAUDE_DIR" \ -e GIT_CONFIG_GLOBAL=/tmp/.gitconfig \ -e CLAUDE_CODE_OAUTH_TOKEN \