[BUG] VS Code extension creates empty editor group (blank pane with only X) when opening panel beside Cursor Agents
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
Opening the Claude Code panel in a new editor column (e.g. via claude-vscode.editor.open / Claude Code: Open in New Tab) while Cursor's Agents pane is already open creates an extra empty editor group — a blank vertical pane with only a close (X) control and no tabs or content.
This is distinct from editor-group locking (#80148 / #20324 / #7752). Even with the lock call neutralized, the empty column still appears. Closing the empty group (click X) is required after nearly every open; reopening Claude recreates it.
Verified in the shipped extension.js of v2.1.220 (minified; Tt = vscode). createPanel defaults toward ViewColumn.Beside, then overrides that with findUnusedColumn() whenever there is no existing Claude webview group:
createPanel(e, t, r) {
// ...
let n = false, i;
if (r !== undefined) {
i = r;
} else {
i = Tt.ViewColumn.Beside;
let a = Tt.window.tabGroups.all.find(/* group whose tabs are all claudeVSCodePanel */);
if (a && a.viewColumn) i = a.viewColumn;
else i = this.findUnusedColumn(), n = true; // ← bug
}
let o = Tt.window.createWebviewPanel("claudeVSCodePanel", "Claude Code", i, /* … */);
// …
return { startedInNewColumn: n };
}
findUnusedColumn() {
let e = new Set;
Tt.window.tabGroups.all.forEach((t) => {
if (t.viewColumn !== undefined) e.add(t.viewColumn);
});
for (let t = Tt.ViewColumn.One; t <= Tt.ViewColumn.Nine; t++)
if (!e.has(t)) return t;
return Tt.ViewColumn.Beside;
}
findUnusedColumn() picks the first absolute ViewColumn number not already claimed by a tab group. Next to Cursor Agents (and other non-standard editor layouts), that absolute column does not match a relative Beside split, so VS Code/Cursor ends up with Claude in one column plus a leftover empty group.
Replacing the call with ViewColumn.Beside (same-length patch: this.findUnusedColumn() → Tt.ViewColumn.Beside||1) stops the empty pane from being created. The lock call on startedInNewColumn is a separate issue (#80148).
What Should Happen?
claude-vscode.editor.open (with no explicit view column) should open Claude in a single new split relative to the active group (ViewColumn.Beside), or reuse an existing Claude column — without leaving behind an empty editor group.
Error Messages/Logs
No error is thrown. Layout after open (Cursor, Agents pane already visible):
- Claude Code editor tab/group
- Agents pane ("New Agent")
- Empty editor group — dark blank area, only an X in the corner
Steps to Reproduce
- Open a workspace in Cursor with the Agents pane open (right side / Agents UI).
- Ensure Claude Code is not already open as an editor tab.
- Run Claude Code: Open in New Tab (
claude-vscode.editor.open), or bind that command to a shortcut and invoke it (e.g. ⌘⌥U). - Observe a third, empty editor column appear (blank pane with only X), in addition to the Claude panel.
Also reproducible when Agents is open and Claude is summoned from a keybinding that calls claude-vscode.editor.open with no view-column argument.
Claude Model
Not sure / Multiple models
Is this a regression?
I don't know
Last Working Version
Claude Code Version
anthropic.claude-code 2.1.220 (Cursor extension; also verified call site in 2.1.216)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Cursor
Additional Information
Proposed fix (minimal): in createPanel, when no existing Claude group is found, keep ViewColumn.Beside instead of calling findUnusedColumn():
if (a && a.viewColumn) i = a.viewColumn;
else i = vscode.ViewColumn.Beside, n = true;
Optionally, prefer an already-empty tab group if one exists (tabGroups.all.find(g => g.tabs.length === 0)), then fall back to Beside.
Related:
- #80148 — feature request to opt out of imperative
lockEditorGroup(sameeditor.open/startedInNewColumnpath; complementary fix) - #20324 / #7752 — locked panels left behind
- #79287 — editor focus/group behavior change after 2.1.215
- #79770 — new-tab icon opens session in wrong editor group
Workaround: binary-patch installed extension.js to replace this.findUnusedColumn() with Tt.ViewColumn.Beside||1 (must re-apply after every extension update).
Environment: anthropic.claude-code v2.1.220, Cursor on macOS (Darwin 25.5.0).
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗