Preflight Checklist
What's Wrong?
The VS Code extension's Remote Control feature fails in devcontainers with:
Remote Control failed to connect: Remote Control initialization failed
The CLI logs:
[bridge:repl] Skipping: bridge not enabled
Root Cause
The extension stores OAuth tokens in VS Code's SecretStorage, but the CLI subprocess it spawns reads credentials from ~/.claude/.credentials.json on disk. In a fresh devcontainer, that file doesn't exist until the user manually runs claude
from the terminal (which triggers login and writes credentials to disk).
Environment
- Claude Code extension & CLI: v2.1.81
- VS Code: 1.112.0
- Container: Debian-based (linux-arm64), running as nonroot user
- devcontainer feature: ghcr.io/devcontainers-extra/features/claude-code:1
Workaround
Run claude once from the devcontainer terminal to authenticate. Credentials persist across container restarts but not full rebuilds.
What Should Happen?
The extension should either:
- Pass its OAuth tokens to the CLI subprocess (via env var, fd, or stdin), so the CLI doesn't need independent on-disk credentials
- Or automatically trigger CLI authentication when it detects credentials are missing on disk but available in secure storage
Error Messages/Logs
[bridge:repl] Skipping: bridge not enabled
Steps to Reproduce
- Create a devcontainer with the Claude Code extension (anthropic.claude-code) and CLI (ghcr.io/devcontainers-extra/features/claude-code:1)
- Build and open the devcontainer
- Open the Claude Code panel in VS Code — the extension authenticates fine (logs show "OAuth tokens found in secure storage")
- Try /remote-control — fails with "Remote Control initialization failed"
- Open terminal, run claude — authenticate via browser
- Try /remote-control again — works
Claude Model
Opus
Is this a regression?
I don't know
Last Working Version
No response
Claude Code Version
2.1.81 (Claude Code)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
No response
Preflight Checklist
What's Wrong?
The VS Code extension's Remote Control feature fails in devcontainers with:
Remote Control failed to connect: Remote Control initialization failed
The CLI logs:
[bridge:repl] Skipping: bridge not enabled
Root Cause
The extension stores OAuth tokens in VS Code's SecretStorage, but the CLI subprocess it spawns reads credentials from ~/.claude/.credentials.json on disk. In a fresh devcontainer, that file doesn't exist until the user manually runs claude
from the terminal (which triggers login and writes credentials to disk).
Environment
Workaround
Run claude once from the devcontainer terminal to authenticate. Credentials persist across container restarts but not full rebuilds.
What Should Happen?
The extension should either:
Error Messages/Logs
Steps to Reproduce
Claude Model
Opus
Is this a regression?
I don't know
Last Working Version
No response
Claude Code Version
2.1.81 (Claude Code)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
No response