[FEATURE] Add --no-extension flag to claude install for devcontainer workflows

Resolved 💬 2 comments Opened Apr 15, 2026 by th-chau Closed May 27, 2026

Preflight Checklist

What Should Happen?

claude install should accept a flag (e.g. --no-extension) to skip automatic VS Code extension installation. This would allow the native installer (curl -fsSL https://claude.ai/install.sh | bash) to be used safely in devcontainers and Docker images.

Why?

In devcontainer workflows, the curl installer auto-installs the VS Code extension, which stores OAuth tokens in VS Code's ephemeral SecretStorage instead of ~/.claude/.credentials.json. The CLI reads from the file on disk, so credentials effectively get hijacked into a separate store that:

  • Doesn't survive container rebuilds
  • Creates a split where the extension is authenticated but the CLI is not (see #38408)

The current workaround is to install via npm install -g @anthropic-ai/claude-code instead, which avoids the extension auto-install entirely. This works, but it means devcontainer users can't use the native binary and have to carry Node.js just for the install path.

Proposed Solution

Add a --no-extension flag (or CLAUDE_SKIP_EXTENSION=1 env var) to claude install that skips the VS Code extension installation step. This would let Dockerfile authors and devcontainer postCreateCommand scripts use the native installer without the credential storage side effects.

Related

  • #38408 — VS Code extension credential split in devcontainers

Claude Code Version

2.1.109 (Claude Code)

Platform

Anthropic API

Operating System

macOS / Linux (devcontainers)

View original on GitHub ↗

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