github / github/copilot-cli

Add a way to un-archive a session that was marked as Done

Ouverte
#4,502 0 commentaires 1 réaction 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

area:sessions
Langage dominant
Shell
Étoiles
11.2k
Forks
1.9k
Merge moyen
14 h 16 min
PR mergées (30 j)
6

Description

Describe the feature or problem you'd like to solve

Marking a session as Done archives it, and there is no way to reverse that from the UI. An accidental click permanently removes an active, in-progress session from the sessions list — even though none of the session's data is actually gone.

This is especially easy to trigger by mis-click: when a session is waiting on a tool permission prompt, the Allow button pops up very close to the Done checkbox in the sessions view on the left-hand side. Reaching for Allow and hitting Done instead archives the session you were actively working in. The two controls being adjacent means the mistake happens precisely in the moment you are trying to move a session forward.

Proposed solution
  1. An un-archive / "mark as not done" action on archived sessions.
  2. A visible way to list/filter archived sessions in the UI so a mis-archived session can be found again.
  3. Ideally, more spacing (or a confirmation) between the Allow button and the Done checkbox, since that adjacency is what makes the mis-click likely in the first place.

Since the underlying data is fully preserved, un-archiving should be a cheap, purely-presentational change — the information needed to restore the session is all still there.

Example prompts or workflows
  • "I accidentally marked an agent as done. Can I recover it?" — the case that prompted this request.
  • Reaching for Allow on a permission prompt, hitting Done, and needing to put the session straight back.
  • Marking a session Done, then discovering the PR needs follow-up work and wanting to resume the original session with its full context rather than starting fresh.
  • Reviewing archived sessions to find one worth reopening.
Additional context

Observed while recovering an accidentally-archived session (Copilot CLI runtime in VS Code):

  • No data is lost on archive. The transcript turns in session-store.db, the events.jsonl event log, the git worktree, the branch, and uncommitted changes were all fully intact.
  • list_sessions reports the session as status: "idle,archived", so the state is clearly tracked and reversible in principle.
  • Sending a new message to the session does not clear the archived flag — the session stays archived even once it becomes active again.
  • The archived flag does not appear in session-store.db or the session-state folder, so there is no supported way to undo it outside the UI.
  • A session can be archived while mid-turn and blocked on a pending permission prompt. In that state the turn is still unfinished, which makes the accidental archive both easy to do and easy to miss.

Guide de contribution

Ouvrir le guide de contribution

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Piste de recherche

Commencez par la vue des sessions et le statut de list_sessions, en particulier l’état idle,archived ; examinez session-store.db et events.jsonl pour confirmer quelles données sont conservées. Le travail est terminé lorsqu’une session archivée peut être trouvée et marquée comme non terminée depuis l’UI, avec des contrôles Allow et Done rendus plus sûrs si cela reste dans le périmètre.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
shell, vscode
Domaine
cli
Type d'issue
Fonctionnalité
Difficulté
4/5
Temps estimé
3-5 jours
Activité
Calme
Clarté
Plutôt claire
Accessibilité débutants
55/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.