VS Code extension: new sessions ignore claudeCode.preferredLocation: "sidebar" since 2.1.268
Environment
- Extension:
anthropic.claude-code2.1.272 (darwin-arm64) - VS Code: 1.134.0
- macOS 25.5.0 (arm64)
- Setting:
"claudeCode.preferredLocation": "sidebar"
What happens
With preferredLocation set to sidebar, starting a new session always opens it as an editor panel in a new tab group. Resuming an existing session from the session list still opens in the sidebar, as expected. Up to 2.1.267 both cases honored the setting.
Expected
A new session should open wherever preferredLocation says, the same as a resumed session.
Cause
pin-to-panel was introduced in 2.1.268 (absent in 2.1.261 through 2.1.267). In the open_in_editor handler:
executeCommand("claude-vscode.editor.open", sessionId, …, {
programmatic: req.newSessionGroupId && !req.sessionId
? "pin-to-panel"
: "honor-preferred-location"
})
and the resolver:
function decide({programmatic, preferredLocation, sessionAlreadyOpenInPanel, fullEditor}) {
if (programmatic) return {
target: programmatic === "honor-preferred-location"
&& preferredLocation === "sidebar"
&& !sessionAlreadyOpenInPanel ? "sidebar" : "panel",
updatePreferredLocationToPanel: false
}
return { target: "panel", updatePreferredLocationToPanel: !fullEditor }
}
A brand-new session has no sessionId, so it takes the pin-to-panel branch and preferredLocation is never consulted.
Secondary annoyance
Because it lands in an editor column, group placement then falls to:
const isClaudeOnlyGroup = g => g.tabs.length > 0 && g.tabs.every(isClaudeTab)
The session only reuses a tab group whose tabs are all Claude tabs, so if a Claude tab shares a group with any source file, each new session splits off yet another column. An opt-in setting for "open new sessions in the active tab group" would help here.
Repro
- Set
"claudeCode.preferredLocation": "sidebar". - Start a new session. It opens as an editor tab, not in the sidebar.
- Open an existing session from the list. It opens in the sidebar.
Workaround
Install 2.1.267 and disable auto-update for the extension.