[BUG] Workspace trust dialog never appears in the VS Code extension (shown via CLI), so project-scope plugins / project .claude/settings.json are silently skipped
[BUG] Workspace trust dialog never appears in the VS Code extension (shown via CLI), so project-scope plugins / project .claude/settings.json are silently skipped
Summary
The Claude Code workspace trust dialog is shown when launching via the CLI (claude in a directory), but is never shown when using the VS Code extension. As a result, a workspace launched only through the extension stays untrusted (hasTrustDialogAccepted: false), and everything gated behind workspace trust — project-scope plugins (<repo>/.claude/skills/<name>/ with a plugin manifest) and project .claude/settings.json hooks — is silently skipped. There is no in-editor way to grant trust.
Environment
- Claude Code: 2.1.170 (also reproduced with extension 2.1.172)
- VS Code extension:
anthropic.claude-code2.1.170 / 2.1.172 (darwin-arm64) - VS Code: 1.123.0
- OS: macOS 15.7.4 (arm64)
Steps to reproduce
- Take a repository that has not been trusted yet (its entry in
~/.claude.jsonhashasTrustDialogAccepted: false, or no entry). - Open that repository in VS Code and start Claude Code through the VS Code extension (not the integrated terminal CLI).
- Observe: no workspace trust dialog appears.
- Now
cdinto the same repository in a terminal and runclaude(CLI): - Observe: the workspace trust dialog appears and can be accepted (which sets
hasTrustDialogAccepted: true).
Reproduced consistently across 3 separate untrusted repositories via the extension (dialog never shown); the same repos show the dialog via CLI.
Expected
The extension should present the same workspace trust prompt the CLI does, so users can grant trust and have project-scope plugins / project .claude/settings.json load.
Actual
No trust prompt in the extension → workspace remains untrusted → project-scope plugins and project settings hooks are skipped with no user-visible reason. Per known debug-log signatures, this manifests as lines like:
Trust not accepted for current directory - skipping plugin installations
Skipping SessionStart:startup hook execution - workspace trust not accepted
Impact
Teams that distribute tooling via project-scope plugins or project .claude/settings.json cannot rely on it for VS Code extension users — those artifacts never load because trust can't be granted in-editor. The only workarounds are launching once via CLI per repo, or hand-editing hasTrustDialogAccepted in ~/.claude.json (undocumented; see #720).
Related issues
- #12227 (open) — same downstream consequence (untrusted → plugins/hooks skipped), but reproduced in the CLI with a "trust not persisting" root cause rather than "dialog never appears".
- #61782 (closed as duplicate) — identical "trust dialog never appears" symptom, but on the Claude desktop app's Code tab, not the VS Code extension. Same class of bug, different surface.
- #36403 (closed as duplicate) — IDE trust acceptance not persisted to
~/.claude.json.
This appears to be the VS-Code-extension instance of the trust-dialog-never-renders class of bug (cf. #61782 for the desktop app), and does not seem to be filed separately yet.
4 Comments
This is happening to me in the regular claude code command, not in an IDE. It keeps saying:
But the trust dialog is not appearing
Still present on 2.1.220, and it has a consequence not yet listed in this thread: repo-committed
extraKnownMarketplacesnever registers, which silently breaks the documented team-onboarding path.Environment
~/.local/bin/claude)anthropic.claude-code2.1.220-darwin-arm64What I observe
~/.claude.jsonon this machine has 13 project entries andhasTrustDialogAccepted: trueon zero of them — including repos I've worked in daily for weeks, exclusively through the extension.projectOnboardingSeenCountis0across the board. I have never seen a trust dialog in the extension.The downstream effect on marketplaces: a repo whose committed
.claude/settings.jsondeclaresnever gets that marketplace registered.
~/.claude/plugins/known_marketplaces.jsongains no entry, and/plugin→ Marketplaces doesn't list it. Access isn't the problem —claude plugin marketplace add my-org/my-marketplacesucceeds immediately over HTTPS for the same private repo.This is not the ancestor-trust variant in #84402: with zero trusted entries anywhere, there is no trusted ancestor to suppress the prompt.
Minimal reproduction (public marketplace, anyone can run)
/tmp/cc-trust-testin VS Code / Cursor and start Claude Code via the extension.python3 -c "import json,os;print(json.load(open(os.path.expanduser('~/.claude.json')))['projects'].get('/tmp/cc-trust-test'))"→hasTrustDialogAccepted: false.~/.claude/plugins/known_marketplaces.jsonhas noclaude-plugins-officialentry from the project declaration;/plugin→ Marketplaces doesn't list it./pluginwarning row, no notification.Why the extension can't show the dialog
The extension spawns the CLI headless rather than as a TTY:
--output-format stream-json --input-format stream-json, withCLAUDE_CODE_ENTRYPOINT="claude-vscode". The CLI's own--printhelp text says:So in the extension's default mode the dialog is structurally unreachable — it isn't suppressed by a flag, and it isn't delegated to the editor.
Worth noting for whoever picks this up: the extension bundles contain zero references to
vscode.workspace.isTrusted,onDidGrantWorkspaceTrust,requestWorkspaceTrust, orhasTrustDialogAccepted. VS Code's own workspace trust is never consulted, and the extension never passes trust state to the CLI — the SDK'sset_cwdacceptstrust_accepted/trusted_directory, but the extension never sets either.package.jsondeclares onlycapabilities.untrustedWorkspaces.supported: false, which just stops VS Code activating the extension in Restricted Mode.Setting
claudeCode.useTerminal: truerenders the real TUI and does show the dialog. That's currently the only in-editor way to grant trust.Compounding problem: this particular failure is completely uninstrumented
Every other trust-gated surface tells the user something.
extraKnownMarketplacesis the exception:| Surface | Behavior on an untrusted workspace |
|---|---|
|
permissions.allow/permissions.additionalDirectories|console.error: "Ignoring N … entries from …: this workspace has not been trusted. Run Claude Code interactively here once and accept the trust dialog, or setprojects[…].hasTrustDialogAccepted: truein~/.claude.json." || agent frontmatter hooks | error-level log +
tengu_agent_hooks_origin_untrustedtelemetry ||
.claude/skills/project plugins | structured/pluginwarningproject-scope-suppressed-untrusted, with the hint "Accept the trust dialog for this workspace, then run/reload-plugins." || MCP
.mcp.jsonapprovals | notification +mcp_approval_persist_gated|| hooks / statusline | debug log "Skipping X - workspace trust not accepted" |
|
extraKnownMarketplaces| nothing — no stderr, no/pluginwarning, no notification, no telemetry |The only trace anywhere is a
--debug-only line, and it names a different gate than the one that actually dropped the config:Why this matters beyond one user
The docs (plugin-marketplaces → "Require marketplaces for your team") tell teams to commit
extraKnownMarketplacesso that "team members are automatically prompted to install your marketplace when they trust the project folder."For every IDE-extension user that is a silent no-op — and critically, the repo owner has no way to discover it didn't work. Teammates simply, quietly, don't have the org's plugins. There's no error to search for and nothing in the UI to notice.
A
project-scope-suppressed-untrusted-style warning for marketplaces would make this self-diagnosing even before the trust-dialog problem itself is fixed. The pattern already exists in the product for the adjacent.claude/skills/case.Two doc-accuracy notes while this is open
extraKnownMarketplaces— "Additional marketplaces to make available for this repository. Typically used in repository.claude/settings.jsonto ensure team members have required plugin sources." — says nothing about requiring trust. #13097 raised exactly this and was closed as stale, then locked.Related
--scope projectplugin installsextraKnownMarketplacesno-op in claude.ai/code cloud sandboxesextraKnownMarketplacesignored inmanaged-settings.jsonClosing for now — inactive for too long. Please open a new issue if this is still relevant.
This issue was incorrectly closed by the github-actions bot, despite having reproduction steps and Claude version. This bot behavior is tracked in https://github.com/anthropics/claude-code/issues/87647. Consider upvoting that issue for visibilty, maybe the bot behavior gets fixed.