[FEATURE] Setting to disable automatic editor group locking in the VS Code extension
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet
- [x] This is a single feature request (not multiple features)
Problem Statement
When the Claude Code panel opens in a new editor column, the extension programmatically locks that editor group by executing workbench.action.lockEditorGroup. Because the lock is applied imperatively, it bypasses the user's workbench.editor.autoLockGroups setting entirely — setting "mainThreadWebview-claudeVSCodePanel": false there has no effect. The extension exposes no setting of its own to opt out (verified against contributes.configuration of v2.1.217).
Consequences for users who don't want the lock:
- Files opened afterwards spawn new splits instead of opening as tabs in the existing group (VS Code routes new editors away from locked groups).
- The lock must be manually removed via "View: Unlock Editor Group" after every panel open / window reload.
- Locked groups are sometimes left behind after the panel closes (see #20324, #7752).
Verified in the shipped extension.js of v2.1.216 / v2.1.217 (minified; Pe = vscode, u = panel manager):
Pe.commands.registerCommand("claude-vscode.editor.open", async (g, x, w) => {
if (w !== Pe.ViewColumn.Active) r.setPreferredLocation("panel");
let { startedInNewColumn: E } = u.createPanel(g, x, w);
if (E) await Pe.commands.executeCommand("workbench.action.lockEditorGroup");
})
The lock is unconditional whenever startedInNewColumn is true.
Proposed Solution
Add a boolean setting, e.g. claudeCode.lockEditorGroupOnOpen (default true to preserve current behavior), to contributes.configuration, and gate the lock call on it:
const shouldLock = vscode.workspace
.getConfiguration("claudeCode")
.get<boolean>("lockEditorGroupOnOpen", true);
if (startedInNewColumn && shouldLock) {
await vscode.commands.executeCommand("workbench.action.lockEditorGroup");
}
If the same pattern exists on other paths (e.g. the claudePlanPreview panel or the webview serializer/restore path), those should respect the setting too.
Alternative (or complementary): let VS Code's built-in workbench.editor.autoLockGroups mechanism drive the locking via the mainThreadWebview-claudeVSCodePanel view type instead of executing the command imperatively — then the existing user-facing VS Code setting would work as users expect.
Alternative Solutions
workbench.editor.autoLockGroupsoverrides formainThreadWebview-claudeVSCodePanelandmainThreadWebview-claudePlanPreviewset tofalse— no effect, since the lock is programmatic.- Manually running "View: Unlock Editor Group" — must be repeated after every panel open / window reload.
- Binary-patching the installed extension (
if(E)->if(E&&!1)) — works, but must be re-applied after every extension update.
Priority
Medium - Would be very helpful
Feature Category
Configuration and settings
Use Case Example
- Open a project in VS Code/Cursor with the Claude Code panel in a side column.
- Open two files from the explorer.
- Today: the second file opens in a new split because the Claude group locked the layout; I unlock the group by hand, and again after the next reload.
- With
"claudeCode.lockEditorGroupOnOpen": false, files open as normal tabs and the layout stays under my control.
Additional Context
Related issues:
- #18337 — same underlying behavior reported as a bug, closed as not planned (hence this explicit opt-out feature request)
- #20324 / #7752 — locked panels left behind in VS Code
- #79287 — editor focus/group behavior change after 2.1.215
Environment: anthropic.claude-code v2.1.216 / v2.1.217, VS Code and Cursor, macOS (Darwin 25.5.0).
UPD: for those, who need a temporary solution:
- skill https://github.com/ChubbyDuck/patch-claude-code-lock
- extension by @mark-hahn https://github.com/mark-hahn/claude-def-grp
16 Comments
@bcherny this issue was first raised nearly a year ago and the subsequent issues have had many comments and thumbs ups! Fix should only be a few lines! :)
@bcherny How can I spend tokens if im slowed down by a lock.
If I want to click and drag all day I would play OSU.
for those who need some temporary solution: https://github.com/ChubbyDuck/patch-claude-code-lock
please resolve, this is so frustrating!
Still present in 2.1.263, and the 2.1.26x line made it structurally unavoidable.
Environment
| | |
|---|---|
| Extension |
anthropic.claude-code2.1.263 (installed on the remote,linux-x64) || VS Code | 1.136.1, commit
a44adf7f53e00964ab890f9f8758a334f1fc15bc|| Client OS | Windows 11 x64 |
| Remote | Linux x64 over Remote-SSH |
|
claudeCode.preferredLocation|panel|What happens
Every session opened from the sidebar session list — and every + New session —
lands in a dedicated right-hand editor group that carries the lock icon, regardless
of which editor group has focus. Clicking a file in the center group first to make it
active does not help.
Why focusing the center group cannot work
Per the decompiled
createPanel()in #83333, the column is chosen by looking for atab group whose tabs are all
claudeVSCodePanel:My center group holds regular source files, so it can never satisfy the
"all tabs are Claude panels" condition. The lookup therefore always resolves to the
right-hand Claude-only group, and
ViewColumn.Active/ real focus never enters thedecision. When no such group exists it falls through to
findUnusedColumn(), whichspawns yet another column. Neither branch can ever target the center group.
The lock icon itself comes from the unconditional
workbench.action.lockEditorGroupcall documented in this issue. As expected,"workbench.editor.autoLockGroups": { "mainThreadWebview-claudeVSCodePanel": false }has no effect, since the lock is applied imperatively.
Worth noting that VS Code upstream went the opposite way:
workbench.editor.chatSessionwas removed from the auto-lock default set in microsoft/vscode#278797, with the
rationale that the experience was inconsistent and that a reserved-group-for-chats
layout "needs to be a new editor concept altogether."
Regression window
This worked on Fri 2026-09-04 — sessions opened in the center group. It broke
after the extension auto-updated to 2.1.263 on 2026-09-07.
2.1.261 shipped this line:
So corralling every Claude tab into one dedicated group is now intended behavior,
which is exactly what makes the absence of an opt-out painful.
Ask
claudeCode.lockEditorGroupOnOpenas proposed in this issue's OP.createPanel()honour
ViewColumn.Activeinstead of the all-Claude-group lookup.Current workarounds
"extensions.autoUpdate": false./resumeinside an existing Claude tab — restores in place, bypasses thegroup-creation and lock path entirely.
ChubbyDuck/patch-claude-code-lockpatches the minified bundle, but must bere-applied after every extension update.
Related
findUnusedColumn()creates a stray empty editor grouppreferredLocationIf anyone cares, I fixed this by creating a vscode extension that does what is needed to undo undesired behavior. I told claude what I wanted and it was working 5 mins later.
If you want my extension, here is claude telling how to get it ...
Claude Default Group – https://github.com/mark-hahn/claude-def-grp
What it does:
Install:
.vsixfrom https://github.com/mark-hahn/claude-def-grp/releases/latestcode --install-extension claude-default-group-<version>.vsix(or Extensions view →...→ Install from VSIX...)Settings live under
claudeDefaultGroup(enabled,unlockOnGroupChange,delayMs), and there are two palette commands: Move Claude Tabs to First Group and Unlock All Editor Groups. Activity is logged to the "Claude Default Group" output channel.It only uses public VS Code commands (
moveEditorToFirstGroup,unlockEditorGroup, the focus-group commands) and the tab groups API, so nothing about Claude Code itself is patched. Source is MIT. This is a workaround, not a fix; aclaudeCode.lockEditorGroupOnOpensetting as proposed above would still be the right answer.This appears to have regressed further recently: as of 2.1.259 (published Sept 2, 2026), the editor group lock now happens even without
claudeCode.preferredLocation: "panel"set — previously that setting was required to trigger it. Removing the setting entirely no longer avoids the lock on 2.1.259.Downgrading the extension to 2.1.258 confirmed the lock does not occur there, so this looks like a regression introduced in 2.1.259 on top of the original opt-in behavior reported here.
2.1.246 doesn't appear to have it
Still reproducible in v2.1.263 (VS Code, Windows).
Worth separating two things here, because gating the lock alone would not fix the split:
createPanelchooses the column itself. It looks for an editor group made up exclusively ofclaudeVSCodePanelwebviews; if there is none, it falls back tofindUnusedColumn()— the first freeViewColumn— which forces a split. Only then doesstartedInNewColumntriggerworkbench.action.lockEditorGroup.open_in_editor, which the host maps toclaude-vscode.editor.openwith noviewColumnargument. So there is no way to click that button and get a plain tab in the group you are working in — the split is unconditional, and no setting reaches it (claudeCode.preferredLocationonly picks sidebar vs. panel).For anyone who keeps chats and files in a single tab strip, every new session tears the editor in two.
Could the fallback be
ViewColumn.Activewhen no Claude-only group exists — either by default, or behind the same setting proposed here?For reference, #36461 asked for essentially this and was closed as not planned after going stale.
Confirming this still reproduces on VS Code extension v2.1.267.
Also confirmed that
claudeCode.preferredLocation: "sidebar"does not work around it — the "+ New session" button routes through thenew_conversation_tabrequest →claude-vscode.editor.opencommand, which is called without the flag that would preserve the user's preferred location, so it forcibly callssetPreferredLocation("panel")and locks the resulting group wheneverstartedInNewColumnis true. So the existing setting is not a usable workaround for the "+ New session" flow specifically (only foropenLast).A
claudeCode.lockEditorGroupOnOpen(or similar) opt-out as proposed here would fix this.Still reproduces on 2.1.266 (macOS 26.6.1, VS Code 1.136.2). The imperative lock is unchanged from the OP:
There is a shipped workaround nobody in this thread has mentioned, and it needs no bundle patch, no downgrade and no third-party extension: the sibling command
claude-vscode.primaryEditor.open, exposed in the palette as "Claude Code: Open in Primary Editor". From the same 2.1.266 bundle:Three consequences:
createPaneltakes itsJ !== undefinedbranch.startedInNewColumnstaysfalseand no column is spawned, which also avoids the stray empty group in #83333.lockEditorGroupon any path, so the lock cannot fire even if the column heuristic changes later.truefor the fifth parameter thateditor.opentests inif (!E) setPreferredLocation("panel"), so it does not clobberclaudeCode.preferredLocationthe way the "+ New session" flow does.The gating context key
claude-vscode.primaryEditorEnabledis settrueunconditionally during activation, so the command is always available.Rebinding the extension's own key makes it the default path:
Limits, so nobody over-reads this:
Np$()returns that group and the tab lands there.ViewColumn.Activeapplies only when no such group exists. Either way there is no new column and no lock.editor.opendirectly.editor.openLast, which forwards toeditor.open, so that button stays on the locking path. Menu contributions cannot be rebound by users.So this is a stopgap for user-initiated opens, not a fix. The
claudeCode.lockEditorGroupOnOpenopt-out proposed in the OP, plus aViewColumn.Activefallback increatePanel, is still the right answer. Given thatprimaryEditor.openalready implements exactly the lock-free, active-column behavior being asked for, routingeditor.openthrough the same helper behind the setting looks like a small change.same problem, broken update, can't use
Please fix and don't force those of us with vision disability to work in whatever way works for you. Just give us the choice.
I need to have my font large to be able to see anything and with this split none of the panels are large enough for me to read anything. It's not a big ask, just go back to allowing us the choice of how we want to work.
I would love if this were fixed 🙂
Please add this feature 🙏