Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Claude Layout SessionNew to Visual Studio Code? Get it now.
Claude Layout Session

Claude Layout Session

LealLabs

|
3 installs
| (0) | Free
Save and restore Claude Code terminal sessions across VS Code restarts. Resume conversations instantly — no lost context, no manual session hunting.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Claude Layout Session

Never lose your Claude Code sessions again. Save your terminal layout — restore it instantly.

All commands are available via Ctrl+Shift+P → type Claude Layout

If you use Claude Code daily, you know the pain: you close VS Code, your terminals vanish, and you're stuck re-opening Claude and losing the thread of every conversation. Claude Layout Session fixes that in one keystroke.


What It Does

Claude Layout Session tracks your active Claude Code terminals — capturing session IDs, models, and working directories — and lets you restore them exactly as they were, even after VS Code restarts.

  • Your conversations don't die when your editor does
  • No more copying session IDs manually
  • No more claude --resume <id> hunting through history
  • Works with PowerShell and WSL terminals side by side
  • Terminals restore silently in the background — no visible paste, no flicker

Features

Feature Description
Save layout Captures every running claude terminal: session ID, model, working directory
Silent restore Terminals open hidden, launch Claude, then appear ready — no visible typing
Parallel restore All terminals start simultaneously, not one by one
Auto session detection Reads real conversation IDs directly from process flags and session files
Toggle Danger Mode Enable/disable --dangerously-skip-permissions per terminal or globally
Change Model Switch model (opus/sonnet/haiku) for all or specific terminals, with optional redeploy
Status bar indicator Shows how many sessions are saved, always visible
Startup notification Toast on VS Code start with one-click restore
PowerShell integration wtsave, wtrestore, wtlist — control from the terminal itself
WSL support Restore WSL terminals with full path resolution
No duplicates Terminals already open are skipped — safe to restore any time

Quick Start

1. Install the extension

2. Save your sessions

  • Open Command Palette (Ctrl+Shift+P) → Claude Layout: Save Sessions
  • Or run wtsave in your PowerShell terminal

3. Restore after restart

  • Press Ctrl+Alt+T
  • Or click the notification that appears on startup
  • Or run wtrestore in your terminal

Commands

Command Keybinding Description
Claude Layout: Save Sessions — Save current Claude terminal sessions
Claude Layout: Restore Sessions Ctrl+Alt+T Restore saved sessions silently in background
Claude Layout: Toggle Danger Mode — Enable or disable --dangerously-skip-permissions
Claude Layout: Change Model — Switch model for all or specific terminals
Claude Layout: List Terminals — Show diagnostic info about open terminals

Toggle Danger Mode

Run Claude Layout: Toggle Danger Mode from the Command Palette to enable or disable --dangerously-skip-permissions:

  1. Choose Enable or Disable
  2. Apply to all terminals or a specific one
  3. Choose whether to redeploy now or just save the config

The setting is persisted in .vscode/terminal-state.json and applied on every restore.


Change Model

Run Claude Layout: Change Model to switch the Claude model mid-session:

  1. Pick a model: opus, sonnet, or haiku
  2. Apply to all terminals or a specific one
  3. Choose whether to redeploy now (closes and reopens affected terminals) or just save

Useful when you're running low on tokens and need to switch everything to sonnet fast.


How It Works

  1. Save scans running claude.exe processes, matches them to VS Code terminals via shell PID, and extracts the real conversation ID from --resume flags. Data is written to .vscode/terminal-state.json.
  2. Restore creates all terminals hidden simultaneously, waits for shells to be ready, sends the claude --resume command to all at once, then reveals them after Claude has initialized.
  3. Terminals already open are skipped automatically.

PowerShell Profile Integration

Add to your $PROFILE for full terminal-level control:

function wtsave {
    $root = (Get-Location).Path
    $trigger = Join-Path $root ".vscode\.wt-save-trigger"
    "save" | Set-Content $trigger -NoNewline
    Start-Sleep -Seconds 5
    $state = Join-Path $root ".vscode\terminal-state.json"
    if (Test-Path $state) { Get-Content $state -Raw | ConvertFrom-Json | ConvertTo-Json -Depth 5 }
}

function wtrestore {
    $root = (Get-Location).Path
    $trigger = Join-Path $root ".vscode\.wt-restore-trigger"
    "restore" | Set-Content $trigger -NoNewline
}

function wtlist {
    $root = (Get-Location).Path
    $trigger = Join-Path $root ".vscode\.wt-list-trigger"
    $result = Join-Path $root ".vscode\.wt-list-result"
    Remove-Item $result -Force -ErrorAction SilentlyContinue
    "list" | Set-Content $trigger -NoNewline
    Start-Sleep -Seconds 3
    if (Test-Path $result) { Get-Content $result -Raw | ConvertFrom-Json | ConvertTo-Json -Depth 5 }
}

WSL Integration

Add to your ~/.bashrc or ~/.zshrc:

function wtsave() {
  root=$(pwd)
  echo -n "save" > "$root/.vscode/.wt-save-trigger"
  sleep 5
  state="$root/.vscode/terminal-state.json"
  [ -f "$state" ] && cat "$state" | python3 -m json.tool
}

function wtrestore() {
  echo -n "restore" > "$(pwd)/.vscode/.wt-restore-trigger"
}

function wtlist() {
  root=$(pwd)
  result="$root/.vscode/.wt-list-result"
  rm -f "$result"
  echo -n "list" > "$root/.vscode/.wt-list-trigger"
  sleep 3
  [ -f "$result" ] && cat "$result" | python3 -m json.tool
}

Requirements

  • Claude Code CLI installed and in PATH
  • Windows with PowerShell or WSL
  • VS Code 1.85+

Data Storage

Layout data is saved per-workspace in .vscode/terminal-state.json. Add it to .gitignore if you prefer not to commit session data.


Changelog

1.0.4

  • Toggle Danger Mode command — enable/disable --dangerously-skip-permissions per terminal or globally
  • Change Model command — switch opus/sonnet/haiku with optional instant redeploy
  • Silent restore — terminals open hidden and appear only when Claude is ready
  • Parallel restore — all terminals start simultaneously

1.0.3

  • Initial Marketplace release

Contributing

Found a bug? Have an idea? Open an issue or a PR on GitHub — all contributions are welcome.


A Note on Sharing

Good tools should be free. We built this because we needed it, and we believe the best software grows when it reaches the people who need it most — not behind a paywall.

If Claude Layout Session saved you time, frustration, or a lost conversation you really needed: share it with your team, your community, or anyone who lives in the terminal. That's how small tools become something bigger.

Thank you for using it, sharing it, and being part of the community. 🤝

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft