Auto-launches Claude Code in a terminal split and sweeps the leftover locked panes — every time you open VS Code.
If you run the Claude Code extension in terminal mode — because you'd rather have the full verbose stream (Ctrl+O) in your own shell than a spinner in a panel — you know the two chores that greet every restart:
A leftover locked empty pane (with a lock icon) where your Claude terminal used to live — you close it by hand.
Clicking the Claude Code button again to relaunch Claude in a fresh split.
Clean Start does both for you. When a window with a folder opens, it:
closes leftover claude terminal tabs and empty editor groups (the locked ghosts), then
runs the same command as the Claude Code button to open a fresh Claude terminal split.
In a window with no folder open, it does nothing.
Why the ghost panes happen
Claude Code creates its terminal as transient, so VS Code never restores it after a restart. But VS Code does restore the editor layout, and the group that held the terminal is auto-locked — and locked groups are not auto-closed even when empty. That empty locked shell is the lock-icon garbage. Clean Start sweeps exactly those: groups with zero tabs, which at startup only exist as restored locked shells.
Requirements
The Claude Code extension (declared as a dependency, installed automatically).
The claude CLI available in your shell.
Notes
The auto-launch calls the Claude Code extension's claude-vscode.terminal.open command. If a future Claude Code update removes it, Clean Start falls back to opening a terminal split running claude directly and shows a notice.
You may see the ghost pane flash for a split second before it is swept — VS Code paints the restored layout before extensions run.