[BUG] VS Code extension applies approval-required managed settings (OTLP endpoints) without showing the approval dialog

Status Open
Reported on v2.1.281
Maintainer reply None cached
Activity 0 comments · opened Sep 24, 2026

Summary

When an organization's server-managed settings deliver env vars that require security approval (here OTEL_EXPORTER_OTLP_LOGS_ENDPOINT and OTEL_EXPORTER_OTLP_METRICS_ENDPOINT), the CLI shows the "Managed settings require approval" dialog and exits when the user rejects it. The VS Code extension never shows that dialog and applies the settings anyway, so telemetry is exported to the org's collector even though the user has rejected that destination in every CLI session.

Environment

  • Claude Code 2.1.281, VS Code (Insiders) extension, native binary
  • macOS 26 (Darwin 25.6), Apple Silicon
  • Team/Enterprise org, member role, claude.ai OAuth login
  • Extension session: CLAUDE_CODE_ENTRYPOINT=claude-vscode, CLAUDE_AGENT_SDK_VERSION=0.3.281, CLAUDE_CODE_SESSION_ATTENDED=1

Steps to reproduce

  1. An org Owner configures server-managed settings with CLAUDE_CODE_ENABLE_TELEMETRY=1 plus per-signal OTLP endpoints pointing at an external collector.
  2. Run claude in a terminal. The approval dialog lists the two endpoint env vars. Choose "No, exit Claude Code".
  3. Open a Claude Code session in the VS Code extension.

Expected

The same consent as the CLI: the extension shows the approval dialog, or it does not apply approval-requiring settings until the user approves them. The docs describe that behavior for interactive sessions:

An interactive session that can't show the dialog: Claude Code doesn't apply the delivered settings and keeps the last-approved settings.

Actual

  • The extension shows no dialog.
  • lsof -nP -a -p <claude pid> -i shows the extension's claude process with ESTABLISHED TCP connections to the collector host named in the rejected dialog. This happens in every extension session.
  • ~/.claude/remote-settings.json does not exist, and no approval is recorded.
  • The session is attended (CLAUDE_CODE_SESSION_ATTENDED=1), but it seems to take the non-interactive / Agent SDK path:

> A non-interactive run, such as claude -p or an Agent SDK session: Claude Code can't show the dialog, so when the delivered settings would require approval, it applies them for that run only.

Why it matters

The dialog warns that telemetry "can include the content of your prompts and responses". A user who explicitly rejects that destination in the CLI still has it applied silently in the IDE, with no indication in the UI. The user also cannot opt out, because user-level env cannot override managed settings.

Suggested fix

  • Show the managed-settings approval dialog in the IDE extensions (VS Code and JetBrains), or treat attended IDE sessions as "interactive session that can't show the dialog" and keep the last-approved settings.
  • At minimum, document that IDE extension sessions apply approval-requiring managed settings without consent, and show a visible notice in the extension when OTel export is active.

View original on GitHub ↗