github / github/app

Improve automatic cleanup of session worktrees and branches

オープン
#2,787 コメント 0 件 リアクション 1 件 担当者 0 名 GitHub で見る
主要言語
言語のデータがありません
スター
2.1k
フォーク
153
PR マージ指標
30日以内にマージされた PR はありません

説明

I use the GitHub Copilot app across many repositories and parallel sessions. Session isolation through worktrees and branches is valuable, but completed work accumulates quickly.

After several weeks, I had 96 stale local branches and 12 worktrees across 41 repositories. Most branches belonged to merged PRs—especially squash merges—but Git could not reliably identify them as merged. Remote branch deletion also left local branches behind. Only one worktree was truly orphaned, but distinguishing it required substantial manual investigation.

Suggested improvements:

- Optional automatic session archival and worktree cleanup after PR merge

- PR-aware detection of squash-merged branches

- Stale-session reminders based on last activity

- A cleanup dashboard showing session, worktree, local branch, remote branch, PR status, and uncommitted changes together

- A safe “archive session and clean associated Git state” action

- Recovery information before destructive cleanup

Cleanup should remain conservative and never remove unique commits or uncommitted files automatically. The main need is better lifecycle visibility and an explicit, integrated cleanup workflow. Parallel agent sessions make this accumulation inevitable rather than exceptional.

```
{
"type": "eval",
"skill": "github-copilot-app",
"mode": "feature_request",
"severity": "suggestion",
"category": "ux",
"user_input": "Improve automatic lifecycle cleanup for session worktrees and branches.",
"timestamp": "2026-08-11T18:57:18Z",
"session_id": "9a2c908c-134c-4552-b8c3-9e4cfe79b838",
"filed_issue": null
}
```

---
| Field | Value |
| --- | --- |
| App version | 1.1.6 |
| OS | macOS 26.6.0 |
| Theme | GitHub |
| Path | /chat |
| Tenure | Week 16 |

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

No files, tests, or entry points are identified in the issue. First clarify which lifecycle-cleanup capability is in scope, then define the session, worktree, branch, PR, and recovery states that must be shown or changed before implementation.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
git, github
領域
desktop, developer-experience, tooling
issue の種類
機能追加
難易度
5/5
見積もり時間
1週間以上
活発さ
静か
明瞭さ
説明が足りない
初心者へのやさしさ
25/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。