You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Chat view "New Chat" always opens a read-only Claude session when the Claude agent is disabled by org policy #345117
GitHub Copilot Business; Claude agent disabled by account policy (Claude3PIntegration)
Policy Diagnostics: no managed settings, chat harness enforcement "Not enforced"
Steps
Open the Chat view (secondary side bar)
Click "New Chat" (+)
Actual
No chat input appears. The view only shows:
"Your organization has disabled this agent. This conversation is read-only.
Continue in Copilot to copy the conversation and keep the original."
"Continue in Copilot" does nothing (the conversation appears empty).
Same result with "New Chat Editor", a new window, and a new profile.
Setting chat.editor.localAgent.enabled: true / chat.defaultToCopilotHarness: false did not help.
Expected
New chats fall back to an allowed harness (Copilot/Local) with a working chat input.
Workaround
Starting a session in the Agents window and opening it from the Chat view's
session list works. New chats via "+" still fail.
Thanks again for the detailed report, and sorry again for the trouble! We have a fix in #345207. When policy disables Claude, New Chat (+) and New Chat Editor will fall back to Local or Copilot with a working input.
Until it ships, you can reset the remembered Claude choice:
In Keyboard Shortcuts, search for Chat: New Local Chat (workbench.action.chat.newLocalChat) and assign it a key, or add this to keybindings.json:
Press it to open a Local chat with a working input.
In the harness picker below the chat input, pick Local or Copilot.
After that, New Chat (+) opens that harness again. Step 3 matters: the keybinding alone opens one working chat, but New Chat (+) goes back to Claude until you pick a harness.
Sharing media and context from merged PR #345207 for verification:
Problem
When org policy disables the Claude agent (Claude3PIntegration, e.g. via the account's preview-features setting), users who had previously chosen Claude could not start a usable chat. Chat view New Chat (+), New Chat Editor, a new window and the restored Chat view all opened an empty Claude chat that only showed:
Your organization has disabled this agent. This conversation is read-only. Continue in Copilot to copy the conversation and keep the original.
There was no chat input, and Continue in Copilot did nothing because the conversation was empty.
The new-chat harness resolver treated every Agent Host session type as usable when the Agent Host was enabled. A remembered (chat.userSelectedSessionType), current or explicit Claude/Codex type therefore kept winning even after policy disabled that provider. The resulting chat was immediately marked read-only.
The same happens with Codex (Codex3PIntegration) when chat.editor.codex.preferAgentHost is on (experiment-controlled in stable), which looks like #344867. Reproduced on main at c6315a9 in an Ubuntu desktop; with that setting off, main falls back to Local.
Fix
isNewChatSessionTypeUsable now treats a local Agent Host provider that policy disables (Claude or Codex) as unusable, so remembered and current choices fall back to the regular default (Local or Copilot).
An explicit request for a policy-disabled harness falls through to the regular resolution instead of opening an unusable chat.
The remembered choice is not cleared, so it applies again if the policy is lifted.
The fallback never picks Local when Local is unavailable: with managed policy requiring the Agent Host, the managed sandbox, chat.editor.preferCopilotHarness, or chat.editor.localAgent.enabled set to false, it resolves to the Copilot harness.
Empty untitled drafts of a disabled harness, persisted before the fix, are replaced on restore in the Chat view and in chat editors. Saved Claude chats with history stay readable as before.
Unsent prompts: the replacement chat gets the chat input's saved empty-chat draft. If the policy arrives while VS Code is open, the read-only draft is replaced with a Local chat that keeps the prompt. With several drafts across a restart, the replacement shows the most recently typed one (existing draft-memory behavior). No step waits on account policy or the network before you can type.
Before / after
Code - OSS built from source in a fresh Ubuntu 24.04 desktop, with the policy in /etc/vscode/policy.json and the user's earlier harness choice remembered. Captions come from checks of the live UI: red marks the read-only banner, green the working chat input.
Codex disabled by policy (chat.editor.codex.preferAgentHost on), click New Chat (+)
Policy applied while VS Code is open, with an unsent prompt in a new Claude chat
Full annotated recording (all three scenarios; Claude also covers Continue in Copilot and New Chat Editor)
before.mp4
after.mp4
Workaround until this ships
Codex: set "chat.editor.codex.preferAgentHost": false in user settings and reload the window. The user setting overrides the experiment value.
Claude: no setting helps (chat.editor.localAgent.enabled and chat.defaultToCopilotHarness don't override the remembered choice). Reset the remembered harness instead: assign a keybinding to Chat: New Local Chat (workbench.action.chat.newLocalChat, hidden from the Command Palette but listed in Keyboard Shortcuts), use it to open a Local chat, then pick Local or Copilot in the harness picker under the chat input. Later New Chat (+) clicks then open that harness. Verified on main at c6315a9.
How to test
Set the Claude3PIntegration policy to false (Linux: /etc/vscode/policy.json; macOS dev build: a defaults value for the product's darwinBundleIdentifier).
Have chat.userSelectedSessionType remembered as agent-host-claude (for example, Claude was picked before the policy applied).
Start VS Code, open the Chat view, click New Chat (+), and run Chat: New Chat Editor. Each should open a usable chat with an input, not the read-only banner.
For Codex, repeat with Codex3PIntegration set to false, chat.editor.codex.preferAgentHost set to true and agent-host-codex remembered.
Validation
Run in the Ubuntu desktop:
At 8c78ba7: ./scripts/test.sh --run src/vs/workbench/contrib/chat/test/common/constants.test.ts: passed (64 tests). The new "only the Copilot harness is allowed" test fails when the policy check is reverted: every case then resolves to the disabled Claude/Codex harness.
At 8c78ba7: npm run eslint -- src/vs/workbench/contrib/chat/test/common/constants.test.ts and npm run typecheck-client: passed.
At ee0b5bd (the code under test is unchanged since): ./scripts/test.sh --run src/vs/workbench/contrib/chat/test/common/constants.test.ts --run src/vs/workbench/contrib/chat/test/browser/widgetHosts/viewPane/chatViewPane.test.ts --run src/vs/workbench/contrib/chat/test/browser/widgetHosts/editor/chatEditorInput.test.ts: passed (145 tests). npm run eslint -- <the 6 changed files>: passed.
Activity
rwoll commentedon Oct 30, 2026
Thanks for reporting! I will take a look at this tomorrow.
rwoll commentedon Oct 30, 2026
Thanks again for the detailed report, and sorry again for the trouble! We have a fix in #345207. When policy disables Claude, New Chat (+) and New Chat Editor will fall back to Local or Copilot with a working input.
Until it ships, you can reset the remembered Claude choice:
workbench.action.chat.newLocalChat) and assign it a key, or add this tokeybindings.json:{ "key": "ctrl+alt+l", "command": "workbench.action.chat.newLocalChat" }After that, New Chat (+) opens that harness again. Step 3 matters: the keybinding alone opens one working chat, but New Chat (+) goes back to Claude until you pick a harness.
vs-code-engineering commentedon Oct 30, 2026
Sharing media and context from merged PR #345207 for verification:
Problem
When org policy disables the Claude agent (
Claude3PIntegration, e.g. via the account's preview-features setting), users who had previously chosen Claude could not start a usable chat. Chat view New Chat (+), New Chat Editor, a new window and the restored Chat view all opened an empty Claude chat that only showed:There was no chat input, and Continue in Copilot did nothing because the conversation was empty.
The new-chat harness resolver treated every Agent Host session type as usable when the Agent Host was enabled. A remembered (
chat.userSelectedSessionType), current or explicit Claude/Codex type therefore kept winning even after policy disabled that provider. The resulting chat was immediately marked read-only.The same happens with Codex (
Codex3PIntegration) whenchat.editor.codex.preferAgentHostis on (experiment-controlled in stable), which looks like #344867. Reproduced on main at c6315a9 in an Ubuntu desktop; with that setting off, main falls back to Local.Fix
isNewChatSessionTypeUsablenow treats a local Agent Host provider that policy disables (Claude or Codex) as unusable, so remembered and current choices fall back to the regular default (Local or Copilot).chat.editor.preferCopilotHarness, orchat.editor.localAgent.enabledset tofalse, it resolves to the Copilot harness.Before / after
Code - OSS built from source in a fresh Ubuntu 24.04 desktop, with the policy in
/etc/vscode/policy.jsonand the user's earlier harness choice remembered. Captions come from checks of the live UI: red marks the read-only banner, green the working chat input.chat.editor.codex.preferAgentHoston), click New Chat (+)before.mp4
after.mp4
Workaround until this ships
"chat.editor.codex.preferAgentHost": falsein user settings and reload the window. The user setting overrides the experiment value.chat.editor.localAgent.enabledandchat.defaultToCopilotHarnessdon't override the remembered choice). Reset the remembered harness instead: assign a keybinding to Chat: New Local Chat (workbench.action.chat.newLocalChat, hidden from the Command Palette but listed in Keyboard Shortcuts), use it to open a Local chat, then pick Local or Copilot in the harness picker under the chat input. Later New Chat (+) clicks then open that harness. Verified on main at c6315a9.How to test
Claude3PIntegrationpolicy tofalse(Linux:/etc/vscode/policy.json; macOS dev build: adefaultsvalue for the product'sdarwinBundleIdentifier).chat.userSelectedSessionTyperemembered asagent-host-claude(for example, Claude was picked before the policy applied).Codex3PIntegrationset tofalse,chat.editor.codex.preferAgentHostset totrueandagent-host-codexremembered.Validation
Run in the Ubuntu desktop:
./scripts/test.sh --run src/vs/workbench/contrib/chat/test/common/constants.test.ts: passed (64 tests). The new "only the Copilot harness is allowed" test fails when the policy check is reverted: every case then resolves to the disabled Claude/Codex harness.npm run eslint -- src/vs/workbench/contrib/chat/test/common/constants.test.tsandnpm run typecheck-client: passed../scripts/test.sh --run src/vs/workbench/contrib/chat/test/common/constants.test.ts --run src/vs/workbench/contrib/chat/test/browser/widgetHosts/viewPane/chatViewPane.test.ts --run src/vs/workbench/contrib/chat/test/browser/widgetHosts/editor/chatEditorInput.test.ts: passed (145 tests).npm run eslint -- <the 6 changed files>: passed.🤖 Authored with GitHub Copilot on behalf of Ross Wollman (@rwoll).
Source PR: #345207
chat: don't start new chats with a harness disabled by policy (micros…
chat: don't start new chats with a harness disabled by policy (#345207)