DriversRecommendedOutdated drivers can make a good PC feel brokenScan driver issues before chasing fixes manually.Scan NowOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run Scan×
Skip to content
Redmond desk5 min

VS Code Copilot Agents vs. Standalone AI Coding Agents: Session Storage and Cleanup

VS Code separates local Copilot session history, optional GitHub sync, and worktree cleanup. Its discovery of standalone-agent sessions does not mean it controls their original storage or deletion.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Short answer: VS Code documents how its own Copilot session history is stored, optionally synced to a GitHub account, and cleaned up—including worktrees that contain code changes. It can also discover sessions from Copilot CLI, the GitHub Copilot app, Claude Code, and Codex. That discovery does not establish that VS Code stores, syncs, or deletes those apps’ original session data.

What counts as a session in VS Code?

A VS Code session groups a unit of work: its workspace, code changes, and one or more chats. Each chat has its own conversation history and context. Closing a chat tab hides it without deleting its conversation; marking work done removes it from the active list while retaining its title and history. Archiving hides a session while retaining it.

Separate conversation histories do not necessarily mean separate files. As the VS Code documentation puts it, “Separate conversations don’t guarantee separate files.” Chats using the same folder or worktree can affect the same files. Use worktree isolation when changes need to remain separate.

Where VS Code Copilot session data is stored

VS Code’s documented Copilot session-history feature uses a local SQLite database. Its history can include repository, branch, working directory, timestamps, agent or participant, conversation turns, files touched, and external references such as pull request and issue numbers or commit SHAs. This describes that VS Code feature; it is not a statement about how every standalone coding agent stores its data.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Sale
Lexar D40E 128GB Dual USB 3.2 Gen 1 Type-C Jump Drive, Champagne Silver
  • USB-C 2-in-1 storage OTG: The Lexar JumpDrive Dual Drive D40E features USB Type-A and Type-C connectors in a slim, portable form factor for easy device compatibility
  • Transfer speeds up to 100MB/s: Based on internal testing, performance may vary depending upon the host device, interface, and usage conditions. 1MB=1,000,000 bytes
  • Plug and Play: Widely compatible with USB Type-C smartphones, tablets, laptops, Macs, and traditional Type-A devices, no software installation required. The 360° swivel design allows for easy switching between connectors without the hassle of losing a cap
  • Durable & Compact: The Lexar D40E USB memory stick features a metal enclosure, withstands temperatures from 0° to 50° C (32°F to 122°F), and is lightweight at 26g with dimensions of 70.4 x 16.9 x 11.7mm
  • Security & Warranty: Securely protects files using an advanced security software solution with 256-bit AES encryption. Backed by a Lexar 3-year limited warranty

VS Code documents local session tracking and cloud sync as separate controls:

Setting or control Documented behavior
github.copilot.chat.localIndex.enabled Controls local session tracking; listed as enabled by default in the VS Code documentation.
chat.sessionSync.enabled Controls syncing sessions to a GitHub account; listed as enabled by default. Set it to false to keep session data local.
chat.sessionSync.excludeRepositories Accepts exact repository names or glob patterns to keep matching repositories’ sessions local.

These defaults and controls are those stated in the VS Code documentation, checked October 7, 2026; settings can change. Enterprise owners can govern session sync through GitHub.com enterprise policy, and the VS Code CopilotSessionSync group policy can force it off.

Synced sessions are private to the user’s personal account by default; sharing is explicit. VS Code says it strips secrets such as tokens, API keys, and credentials before data leaves the machine. Turning sync off does not remove sessions already synced to the cloud.

Rank #2
SANDISK 128GB Ultra Flair, USB-A Flash Drive, Up to 150MB/s Read Speeds
  • High-speed USB 3.0 performance of up to 150MB/s(1) [(1) Write to drive up to 15x faster than standard USB 2.0 drives (4MB/s); varies by drive capacity. Up to 150MB/s read speed. USB 3.0 port required. Based on internal testing; performance may be lower depending on host device, usage conditions, and other factors; 1MB=1,000,000 bytes]
  • Transfer a full-length movie in less than 30 seconds(2) [(2) Based on 1.2GB MPEG-4 video transfer with USB 3.0 host device. Results may vary based on host device, file attributes and other factors]
  • Transfer to drive up to 15 times faster than standard USB 2.0 drives(1)
  • Sleek, durable metal casing
  • Easy-to-use password protection for your private files(3) [(3)Password protection uses 128-bit AES encryption and is supported by Windows 7, Windows 8, Windows 10, and Mac OS X v10.9 plus; Software download required for Mac, visit the SanDisk SecureAccess support page]

How archive, deletion, and sync removal differ

  • Close a chat tab: hides the chat; its conversation remains.
  • Mark a session done: removes completed work from the active list while retaining its title and history.
  • Archive a session: hides it while retaining it.
  • Delete a chat or session: permanent. VS Code warns, “Deleting a session is irreversible.”

To remove synced session data, run the github.copilot.sessionSync.deleteSessions command and choose cloud-only deletion or local-and-cloud deletion. The latter cannot be undone. Disabling sync is not a substitute for deleting data already in the cloud.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Deleting a Copilot session can also remove its associated worktree if no other linked session still uses it. A shared worktree remains until its last linked session is deleted or archived. Before deleting, integrate or commit changes that exist only in the worktree: removing it can otherwise lose those files.

How to review and clean up inactive worktrees

VS Code’s manual cleanup editor is a review-and-confirm workflow, not an automatic purge. The editor offers inactivity thresholds of 7, 15, 30, 60, or 90 days, shows estimated worktree size, and lets you confirm which items to clean up.

Rank #3
2 Pack 64GB USB Flash Drive USB 2.0 Thumb Drives Jump Drive Fold Storage Memory Stick Swivel Design - Black
  • What You Get - 2 pack 64GB genuine USB 2.0 flash drives, 12-month warranty and lifetime friendly customer service
  • Great for All Ages and Purposes – the thumb drives are suitable for storing digital data for school, business or daily usage. Apply to data storage of music, photos, movies and other files
  • Easy to Use - Plug and play USB memory stick, no need to install any software. Support Windows 7 / 8 / 10 / Vista / XP / Unix / 2000 / ME / NT Linux and Mac OS, compatible with USB 2.0 and 1.1 ports
  • Convenient Design - 360°metal swivel cap with matt surface and ring designed zip drive can protect USB connector, avoid to leave your fingerprint and easily attach to your key chain to avoid from losing and for easy carrying
  • Brand Yourself - Brand the flash drive with your company's name and provide company's overview, policies, etc. to the newly joined employees or your customers
  1. Open the Command Palette and run Chat: Open Worktree Cleanup.
  2. Select an inactivity threshold and review the eligible sessions and estimated worktree sizes.
  3. Select the worktrees you want removed and confirm the cleanup.

Cleanup marks selected sessions done and schedules their worktrees for removal. Before removing a worktree, VS Code attempts to commit uncommitted changes to that session’s branch. If changes cannot be preserved or removal fails, the worktree remains. Session and branch history are retained; restoring a session recreates its worktree.

The cleanup editor excludes sessions that are active, running, waiting for input, pinned, done, archived, untitled, in an error state, or newer than the chosen inactivity period. It also excludes worktrees whose size cannot be measured.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Cleanup suggestions are prompts, not deletion triggers

An experimental suggestion can be enabled with chat.agentSessions.sessionStorageCleanupSuggestion.enabled; the setting is disabled by default in the VS Code settings reference. The suggestion appears when inactive worktrees occupy at least 5 GiB or when 20 worktrees qualify. Those thresholds prompt you to open the cleanup editor; they do not cause automatic deletion.

Rank #4
SIMMAX 32GB Memory Stick USB 2.0 Flash Drives Swivel Thumb Drive Pen Drive (32GB Purple)
  • GOOD VALUE PACKAGE - 1 Pack 32GB Memory Stick USB 2.0 Flash Drives with great cost performance and high quality.
  • BIG CAPACITY - The available capacity: 29.10GB-29.8GB, You can save the data of movies, music, photos, designs, programs, manuals, handouts in a high speed.Good performance in digital data storing, transferring and sharing with families, friends, workmates, clients and machines.
  • EASY TO USE & PLUG AND WORK - Support windows 7 / 8 / 10 / Vista / XP / 2000 / ME / NT Linux and Mac OS, Compatible with USB2.0 and below.
  • TWISTTURN DESIGN & EASY CARRY - The metal clip rotates 360° round the ABS plastic body which with rubber oil skin feeling finish. The capless design can avoid lossing of cap, and providing efficient protection to the USB port.
  • WARRANTY & SUPPORT - SIMMAX logo is laser printed on the USB connector surface, our products are of good quality and we promise that any problem about the product within one year since you buy.

Automatic cleanup of merged sessions is a separate preview

Automatic cleanup for merged sessions is distinct from the manual editor and is documented as a preview feature. Both settings for marking eligible sessions done and deleting them after a grace period are disabled by default. The recommended grace period is 15 days.

Eligibility requires an inactive session with a merged pull request and no related open pull requests; external sessions are excluded. For this lifecycle, VS Code removes a worktree only when its branch tracks an upstream and has no outgoing commits or uncommitted changes. If Git state is unknown or a condition is unmet, the worktree is retained. VS Code does not force-remove it.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

What VS Code’s external-session discovery does—and does not—mean

VS Code says its sessions list can discover supported local sessions created by Copilot CLI, the GitHub Copilot app, Claude Code, and Codex. Copilot sessions include repository-associated sessions updated within the last seven days. External sessions are hidden by default; available filters include recent sessions, the last 24 hours, the last seven days, or all discovered sessions.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value
IMEASON Swivel Design 16GB USB Flash Drive with Keychain, USB 2.0 Portable Thumb Drive Memory Stick, FAT32 Format Flashdrive for Data Storage, Photos, Music, Files (Black, 16 GB)
  • 【16GB Flash Drive】USB flash drives with 16GB capacity, meet your needs of daily use on work, school, home and travelling for photos, music, videos, files storage and transfer. IMEASON thumb drives can be used to store different files, easy to data backup.
  • 【Metal Swivel Cap Design】USB thumb drive is metal swivel cover provides extra protection for the usb thumbdrive connector, no usb drive cap to lose; keychain design makes it easier to carry without worrying lose it.
  • 【Wide Compatibility】USB drive supports Windows 7/8/10/11 / Vista / XP / Unix / 2000 / ME / NT Linux and Mac OS, also Supports USB 2.0 and 1.1 ports. USB Stick support TV, desktop, notebook computer, car, audio and other device. The USB Memory Stick is your great data storage and transfer companion with traveling and working.
  • 【Easy to use】usb memory stick is plug and play without any software installation. Just simply plug the Flashdrive into the port of your USB-compatible devices such as computer, laptop to start data storage or transmission.
  • 【What You Get】16 GB USB Flash Drive Thumb Drive, The default format of the usb storage flash drive is FAT32.

Discovery is not a documented cross-product storage or deletion contract. The reviewed VS Code material does not establish each standalone product’s local file paths, cloud-retention rules, account policies, or deletion behavior. Nor does it say that deleting an external session from VS Code erases the source session in its standalone application. Treat VS Code cleanup as applying to the VS Code-managed session or worktree described by the relevant control, not as proof of deletion everywhere.

Which cleanup action should you use?

Your goal Use What it changes
Get completed work out of the active list but keep its history Mark the session done Retains the title and history.
Hide a session without deleting it Archive it Retains the session; an associated shared worktree may remain.
Free space from inactive VS Code worktrees after review Chat: Open Worktree Cleanup Marks selected sessions done and schedules worktree removal; attempts to preserve uncommitted changes and retains history.
Remove synced Copilot session data github.copilot.sessionSync.deleteSessions Choose cloud-only or local-and-cloud deletion; the latter is irreversible.
Delete a session and its associated worktree Delete the session Permanent; worktree removal depends on whether another linked session still uses it.
Delete an original session in a standalone agent Use that agent’s own controls VS Code’s discovery documentation does not specify the external application’s deletion behavior.

For a session that matters, inspect and preserve its code changes before any permanent deletion. Conversation history, cloud copies, and worktree files are separate things to consider; removing one does not necessarily remove the others.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Outdated Drivers Are Slowing You DownFree scan - exact matches

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.