github / github/app

Embed (automatic) cleanup options to remove old sessions

Open
#1,903 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
No language data
Stars
2.1k
Forks
153
PR merge metrics
No merged PRs in 30d

Description

### Feature summary

Cleanup old worktrees and storage

### What problem are you trying to solve?

My machine was running out of storage and I suspected that worktrees of my AI tools could be a part of the issue. So I checked the `.copilot` folder and indeed: 200 GB of storage used!!!

Image

### Proposed solution

Enable proper data cleanup on old sessions, especially the ones that where completed with a merged pr, as those are the most likely to never be needed.

### Workflow impact

Make my machine usable again!

### Installation context

_No response_

### Additional context

Claude Code handles this perfectly for me with this (just discovered) setting:

Image

Contributor guide

Open the contributing guide

Research direction

No files, tests, or entry points are named. Start by locating where sessions, worktrees, and .copilot storage are managed, then define cleanup behavior for old sessions, especially those associated with merged pull requests. Done should include a usable cleanup option that prevents old worktrees and session data from consuming excessive storage.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, github
Domain
desktop, devtools
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.