claude-code - 💡(How to fix) Fix [FEATURE] Add --no-extension flag to claude install for devcontainer workflows [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#48415Fetched 2026-04-16 07:00:47
View on GitHub
Comments
0
Participants
1
Timeline
4
Reactions
0
Author
Participants
Timeline (top)
labeled ×4

Fix Action

Fix / Workaround

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.

RAW_BUFFERClick to expand / collapse

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)

extent analysis

TL;DR

Adding a --no-extension flag to claude install would allow skipping automatic VS Code extension installation, resolving credential storage issues in devcontainers.

Guidance

  • To verify the issue, check if the VS Code extension is installed automatically when running claude install in a devcontainer, and if the credentials are stored in ~/.claude/.credentials.json or VS Code's SecretStorage.
  • The proposed solution involves adding a --no-extension flag or CLAUDE_SKIP_EXTENSION=1 env var to claude install to skip the extension installation step.
  • To mitigate the issue, users can currently install via npm install -g @anthropic-ai/claude-code, but this requires carrying Node.js in the devcontainer.
  • The fix would enable devcontainer users to use the native binary without the credential storage side effects.

Example

No code snippet is provided as it is not clearly supported by the issue.

Notes

The issue is specific to devcontainer workflows and the use of the native installer. The proposed solution aims to provide a flag to skip the VS Code extension installation, which would resolve the credential storage issues.

Recommendation

Apply workaround: use npm install -g @anthropic-ai/claude-code until the --no-extension flag is implemented, as it allows devcontainer users to avoid the credential storage side effects, although it requires carrying Node.js in the devcontainer.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING