Skip to content

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

Description

@jeroenhuinink

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:sessionsSession management, resume, history, session picker, and session state

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions