Repository navigation
Agent suggestions
Public previewDescription
Summary
The chat agent/session-type picker lets users disable the Cloud, Claude and Codex agents via settings, but there is no supported setting to hide or disable the built-in "Copilot" agent (agent-host-copilotcli). It therefore cannot be removed from the picker in any documented way, even though the UI presents the other entries as configurable peers.
Environment
| Item | Value |
|---|---|
| VS Code | 1.142.0 (commit 6d62b1d5dace93a33b3a6d3eca1317bd5e15bcb1, x64) |
| OS | macOS 13.7.8 (build 22H730) |
| Relevant extension | GitHub Copilot Chat (built-in) |
| Configuration scope | User settings.json |
Steps to reproduce
- In user
settings.json, disable every agent that currently has a setting:"github.copilot.chat.cloudAgent.enabled": false, "chat.agentHost.claudeAgent.enabled": false, "chat.agentHost.codexAgent.enabled": false
- Also try the one setting that sounds like it should apply:
"github.copilot.chat.backgroundAgent.enabled": false
- Fully restart VS Code (and reload the window once more).
- Open the Chat view and click the agent / session-target picker.
Expected behavior
The picker should contain a way to suppress the Copilot entry, symmetric with the existing *.enabled settings for Cloud / Claude / Codex. Since the picker is explicitly a choice of agent, every non-hardcoded entry should be opt-out-able by settings.
Concretely, any one of the following would be acceptable:
chat.agentHost.copilotAgent.enabled(boolean, defaulttrue), or- a generic list such as
chat.agentPicker.hiddenSessionTypes: string[], or - reusing the existing
github.copilot.chat.backgroundAgent.enabledfor the picker entry as well.
Actual behavior
The picker still lists Copilot (label rendered as Copilot, i.e. "在本地智能体主机进程中运行 Copilot SDK 智能体"), and Cloud / Claude / Codex are correctly gone.
The three supported settings work as advertised. Setting github.copilot.chat.backgroundAgent.enabled to false has no effect on the picker entry.
Root cause analysis (verified against the shipped bundle)
Inspecting out/vs/workbench/workbench.desktop.main.js in the installed build:
- The picker is assembled as "Local" (hardcoded, first) + every registered chat session type. The Copilot entry is not a
contributes.chatSessionscontribution from the Copilot extension — it is registered dynamically by the core service: the picker item's type id isagent-host-${provider}(hereagent-host-copilotcli). - That dynamic registration passes neither a
whenclause norhideFromSessionTypePicker. Since it has nowhen, no configuration value can ever remove it. - The per-provider gate function only special-cases the two agents that have settings. The dispatch is effectively:
Because
if (provider === "claude") { /* gated by chat.agentHost.claudeAgent.enabled */ } if (provider === "codex") { /* gated by chat.agentHost.codexAgent.enabled */ } return true; // default: every other provider is always enabled
copilotclifalls into the default branch, it is unconditionally visible. Adding a new provider today silently produces a non-disableable entry, which is exactly what happened here. - The Copilot extension's
contributes.chatSessionsentries arewhen-gated (e.g. onconfig.github.copilot.chat.backgroundAgent.enabled), and the service does evaluate those viaContextKeyExpr.deserialize(when)in_isContributionAvailable(). But those contributions only drive the session list; the picker entry comes from the dynamicagent-host-*registration path, so thewhenclause never gates it. - Note there is already a hardcoded exclusion for the static
copilotclicontribution in the picker-assembly helper, which is why togglingbackgroundAgent.enabledchanges the session list but not the picker. In other words, two different code paths disagree about whethercopilotclibelongs in the picker, and neither of them is settings-driven.
Impact
- Users who intentionally work with a different provider (BYOK models, local agents, external agent hosts) keep an entry they never use and cannot remove.
- The entry advertises an agent whose sign-in flow may be unavailable to the user, so selecting it leads to a dead end.
- Managed / enterprise environments cannot present a curated agent list via settings; the only remaining options are unsupported (see workaround below).
Workaround currently required (unsupported)
The only way to hide it is to inject CSS into out/vs/code/electron-browser/workbench/workbench.html with a third-party extension (e.g. be5invis.vscode-custom-css) and target the list row by its aria-label prefix. This:
- patches a shipped file and therefore triggers the "Your Code installation appears to be corrupt" warning unless checksums are also rewritten;
- silently stops working after every VS Code update;
- is obviously not a viable solution for managed environments.
That is a strong signal that this should be a first-class setting.
Requested change
Please gate the dynamically registered agent-host-copilotcli picker entry (and future agent-host-* entries) behind a setting, so that the agent picker is fully configurable end-to-end. Defaulting to true preserves current behavior; the important part is that an opt-out exists.
Additional context
Reproducible with no third-party extensions installed — only the built-in Copilot extension is involved. I am not asking to hide the hardcoded Local entry, and I am not asking for chat.disableAIFeatures behavior (that disables the feature set entirely rather than a single picker entry).
Activity
petersonjdNIH commentedon Oct 31, 2026
The Copilot session by default in VS Code's GitHub Copilot Chat has been the most frustrating new behavior ever. It results in unsigned commits and the entire session not being able to interact with the GitHub Codespace or the VS Code window. Users should be able to set up their default behavior and have it stick, but this one is entirely impossible right now.
From my research, this is what I've been able to dig up:
There is no documented setting that restricts Copilot Chat to Local only, and nobody has reported a complete fix. I found three partial controls and a few related open issues. I searched microsoft/vscode and github/copilot-cli, and I couldn't search GitHub-wide because gh isn't authenticated in this session.
The gap: microsoft/vscode#342291 (open)
The reporter confirms you can hide Cloud, Claude and Codex with these settings:
github.copilot.chat.cloudAgent.enabled: falsechat.agentHost.claudeAgent.enabled: falsechat.agentHost.codexAgent.enabled: falseNo setting hides the built-in Copilot session type (
agent-host-copilotcli). That is the one that can't sign commits for you.github.copilot.chat.backgroundAgent.enabled: falseonly affects the session list, not the picker.The reporter's analysis says Local is hardcoded and the Copilot entry is registered with no gating condition.
The only workaround they found is injecting CSS into VS Code's shipped workbench.html, which is unsupported and breaks on every update.
Other issues that match your situation:
microsoft/vscode#343575 (open): New chats now default to the Copilot harness. Its agents fall back to a separate shell and fail where Local works. The reporter asks for documentation on keeping Local as the default, and there is no maintainer reply yet.
microsoft/vscode#341462 (open, assigned): Copilot CLI sessions can't use the visible VS Code terminals. This is the isolation you described.
microsoft/vscode#316791 (open): git commit hangs in the Agents App bash tool when SSH signing is on. The cause is that GIT_ASKPASS and the related variables aren't set. This is related to your Secretive setup, but it was reported for the Agents App, not Codespaces.
microsoft/vscode#334495 (open): The Agents Window should respect git.enableCommitSigning.
microsoft/vscode#334499 (open): This shows Copilot CLI can be disabled by an organization policy. VS Code still starts the CLI component and shows a sign-in popup, so the policy doesn't fully remove it.
I found no report specifically about Codespaces signing failing in Copilot CLI sessions, and no github/copilot-cli issue on it.
What you can do today:
Org policy: An org owner can disable Copilot CLI under the organization's Copilot settings. Based on #334499, it blocks the sessions from working, but I haven't confirmed it removes the picker entry.
Settings: Put the three settings above in your Codespaces default settings or dotfiles. That narrows the picker to Local plus Copilot.
Instructions: Add a rule to AGENTS.md so agents never run git commit or git push. It's soft enforcement but works in every session type.