github / github/copilot-cli

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

Open
#4,502 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

area:sessions
Dominant language
Shell
Stars
11.2k
Forks
1.9k
Avg merge
14h 16m
Merged PRs (30d)
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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the sessions view and the list_sessions status, especially the idle,archived state; review session-store.db and events.jsonl to confirm what data is retained. Done means an archived session can be found and marked as not done from the UI, with the Allow and Done controls made safer if that remains in scope.

Written by the indexing model from the issue text.

Assessment

Tech stack
shell, vscode
Domain
cli
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.