Skip to content

Agents window: extensions.supportAgentsWindow cannot opt out extensions listed in sessionsWindowAllowedExtensions #341011

Closed

Description

@weiminghaoo

Summary

There is no supported way to keep one of the extensions listed in product.json → sessionsWindowAllowedExtensions enabled in editor windows but disabled in the Agents window.

extensions.supportAgentsWindow accepts a per-extension boolean, but for those 28 ids the value is never read, so false is silently a no-op.

Steps to reproduce

  1. Install and enable an extension whose id appears in product.json → sessionsWindowAllowedExtensions (e.g. Vue.volar) in the default profile.
  2. In settings.json:
    "extensions.supportAgentsWindow": { "vue.volar": false }
  3. Open / reload the Agents window.
  4. Inspect the Agents window's extension host log (Extensions → extension host log for the window whose workspace is agent-sessions.code-workspace).

Actual: Vue.volar is still activated in the Agents window.
Expected: false should force it off for the Agents window — the setting's own schema allows a boolean (defaultSnippets: [{ body: { "pub.name": true } }]). If only true is meaningful, the schema/docs should say so and there should be some other per-window opt-out.

Additional symptom: the setting is not registered in the Agents window

extensions.supportAgentsWindow is registered in the editor window (registerConfiguration({ id: "extensions", ... }) in vs/workbench/contrib/extensions/browser/extensions.contribution.ts), but it is not present in the Agents window's configuration registry (the Agents window bundle only reads it via configurationService.getValue()).

Consequence: editing it from the Agents window — the only window it affects — reports "Unknown Configuration Setting", even though the value does take effect.

Root cause (read from the shipped 1.141.0 bundles)

ExtensionsEnablementService._isDisabledBySessionsWindow() tests the product allowlist before consulting the setting:

_isDisabledBySessionsWindow(e) {
  if (!isSessionsWindow || this._sessionsWindowAllowedExtensions.has(e.identifier.id.toLowerCase()))
    return false;                    // ← allowlisted ids always short-circuit here
  if (e.isBuiltin) { ... }
  return !this.extensionManifestPropertiesService.canExecuteOnSessionsWindow(e.manifest);
}

_sessionsWindowAllowedExtensions is initialised from product config:

this._sessionsWindowAllowedExtensions =
  new Set((product.sessionsWindowAllowedExtensions ?? []).map(v => v.toLowerCase()));

Because the allowlist check comes first, getConfiguredSessionsWindowSupport() — the function that reads extensions.supportAgentsWindow — is never reached for those ids.

_computeEnablementState() starts from the user's enablement state and has no branch that turns an enabled extension back off for the Agents window:

r = this._getUserEnablementState(e.identifier);
let a = this.isEnabledEnablementState(r);
return ... : this._isDisabledBySessionsWindow(e) ? r = 2    // ← false for allowlisted ids
          : ... : !a && this._isEnabledInEnv(e) && (r = 3),

so an enabled allowlisted extension resolves to enabled regardless of extensions.supportAgentsWindow.

Scope note — a global disable does work

Verified on 1.141.0: an id that is both in the global disabled list and in the allowlist (e.g. redhat.java) is correctly not activated in the Agents window. So the allowlist does not override a global disable.

The gap is specifically that there is no way to scope a disable to the Agents window only. Workspace-scoped disables do not apply either, because the Agents window is its own workspace (agent-sessions.code-workspace). The only lever today is a global disable, which also disables the extension in every editor window.

Request

One or more of:

  • Honour false in extensions.supportAgentsWindow even for ids in sessionsWindowAllowedExtensions, and/or
  • Register extensions.supportAgentsWindow in the Agents window's configuration registry, and/or
  • Document the allowlist and provide a supported per-window opt-out.

Environment

  • VS Code 1.141.0 (Stable), macOS 15 (darwin 24.6.0), Apple Silicon
  • Agents window opened as its own window; workspace = the generated agent-sessions.code-workspace

Activity

  1. weiminghaoo commented on Oct 12, 2026

    @weiminghaoo
    Author

    Why this matters — concrete user impact

    1. Allowlisted language/tooling extensions keep running in the Agents window where they serve no purpose, and their progress notifications keep popping up.

    Concrete example — redhat.java is in sessionsWindowAllowedExtensions, so it is always activated in the Agents window. Its activation event is workspaceContains:*/pom.xml,*/build.gradle,*/settings.gradle,*/build.gradle.kts,*/.classpath, and it matches against the session's workspace. So whenever an Agents-window session targets a Gradle/Maven repo, the Java extension host starts there too — the JVM language server boots, resolves the classpath, and its "checking…" progress notification appears in the bottom-right corner of a window that is not a Java editor and has no Java editing surface (no Problems panel, no editor language features for it to feed).

    The Agents window is a chat/session surface, so the extension has nothing useful to do there — the only visible outcome is server startup cost and recurring progress notifications.

    Same class of problem for the other allowlisted language extensions (Vue.volar, dbaeumer.vscode-eslint, esbenp.prettier-vscode, bradlc.vscode-tailwindcss, dsznajder.es7-react-js-snippets, kisstkondoros.vscode-gutter-preview, …): each one boots a server or an activation cost in a window that cannot use it.

    2. There is no escape hatch that does not break the editor windows.

    As described in the report, for these ids:

    • extensions.supportAgentsWindow: { "<id>": false } → no effect (allowlist short-circuits before the setting is read)
    • workspace-scoped disable → no effect (the Agents window is its own workspace, agent-sessions.code-workspace)
    • the only working lever is a global disable, which also removes the extension from every editor window where it is wanted

    That trade-off is not acceptable: you cannot use redhat.java in your Java editor windows and keep it out of the Agents window at the same time. Either you lose it where you need it, or you pay for it where you don't.

    Proposal

    Since extensions can rarely contribute anything useful to the Agents window (no editor, and no views panel for most of them), consider inverting the model:

    1. Default to no extensions in the Agents window — make extensions.supportAgentsWindow: { "<id>": true } the only way in, and treat the product list as "verified compatible with the Agents window" rather than "always enabled". This would make the Agents window quiet by default, and fix the notification/CPU cost above without touching the editor windows; and/or
    2. Honor "<id>": false for every extension id, including allowlisted ones, so a per-window opt-out is at least possible.

    Either option fixes the reported problem without forcing users into a global disable.

  2. weiminghaoo commented on Oct 12, 2026

    @weiminghaoo
    Author

    Concrete trigger for the notification spam (added evidence)

    Traced on 1.141.0.

    The Agents window's extension host does have the session's workspace folder mounted — the window log shows file-watcher registrations for the session repo root and its .agents/skills/** files — even though the window itself is opened on agent-sessions.code-workspace (whose folders is empty). So workspaceContains activation events are evaluated against the session repo, not only against the window's folder list.

    Concrete case: a session targeting a Flutter repository. Its Android subfolder contains android/build.gradle, android/app/build.gradle and android/settings.gradle, which matches redhat.java's activation event:

    ExtensionService#_doActivateExtension redhat.java, startup: true,
    activationEvent: 'workspaceContains:*/pom.xml,*/build.gradle,*/settings.gradle,*/build.gradle.kts,*/settings.gradle.kts,*/.classpath'
    

    Result: the Java extension host boots in the Agents window (JVM language server, classpath resolution, "checking…" progress notification in the bottom-right) for a project that is not a Java project. And because redhat.java is in sessionsWindowAllowedExtensions, there is no way to stop it — see the two escape-hatch problems in the report above.

    So the practical cost is: recurring background work, memory, and notifications in a window where the extension cannot actually be used.

  3. benibenj commented on Oct 26, 2026

    @benibenj
    Contributor

    Thanks for the detailed report! We'll add support for opting out of extensions enabled by the product defaults using "extensions.supportAgentsWindow": { "vue.volar": false }, without disabling them in editor windows. The fix is in #344242 and also makes the setting recognized in the Agents window.

    Is Vue (or another extension) causing problems in the Agents window that we should know about? Any details or reproduction steps would help us improve extension compatibility and the overall experience.

  4. added a commit that references this issue on Oct 26, 2026
    2a7037f
  5. added this to the 1.145.0 milestone on Oct 26, 2026
  6. added
    insiders-releasedPatch has been released in VS Code Insiders
    and removed
    unreleasedPatch has not yet been released in VS Code Insiders
    on Oct 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

insiders-releasedPatch has been released in VS Code Insiders

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions