Undo a session action (Ctrl+Z)
Press Ctrl+Z to reverse the last thing you did to a session — pause, snooze, archive, move, rename, close, bookmark — and Ctrl+Y to put it back. Right after you send a message, answer a question card, or Allow/Deny or Approve/Reject a request, and the app moves you on to the next session, Ctrl+Z takes you back to the session you just left. The history is a shared 25-step stack, so you can walk back through a burst of actions rather than just the last one — though while a text box has focus, Ctrl+Z belongs to that box, and the app-level undo fires everywhere else.
On this page
What it is
Ctrl+Z is the session list's "put that back". It reverses the last undoable action you took — the row returns to where it was and to the state it was in — and Ctrl+Y re-applies what you just undid.
It is deliberately not a reset, and it is not per-row: it is one history of recent actions in the order you took them.
- What it covers: every change you make to a session — pause / unpause, snooze / unsnooze / cancel snooze, archive / unarchive / restore, save / unsave, pin / unpin, mark read / unread, move to project, set colour, rename, close, dismiss a finished terminal and bookmarking — from the sidebar, the right-click menu, Manage Sessions, the keyboard, the phone and voice commands alike. Pausing or archiving a whole selection records one entry that undoes the whole batch; so does P on a selection that mixes archived and live sessions. Saving a selection records one entry per session.
- If an undo cannot be done (for example the app refuses to re-archive a session that has work not saved anywhere else), you are told why and the undo stays at the top of the history, so the next Ctrl+Z tries again. An old toast's Undo button only ever undoes its own action.
- Sending a message: when a reply, a quick reply, the Continue button or the inbox Check in moves you on to the next session, Ctrl+Z takes you back to the session you just messaged, in the view you sent from. The message stays sent — an agent cannot un-receive it — so this undo is a "go back", not an unsend. If the send fails, or leaves you on the same session, nothing is added to the history.
- Answering a card or a request: answering a question card, clicking Allow / Deny on a permission prompt, or Approve / Reject on an approval card in the conversation works the same way when it moves you on. The undo toast names what you did ("Answered…", "Responded to…"). Approving from the inbox's approvals list is not covered — that list moves you between requests, not away from a conversation.
- What it does not cover: Stop and Restart (relaunching an agent costs real tokens, so it is never on the undo stack), and deleting a project (permanent, confirmed separately — see delete-a-project.md).
- The history is shared, not session-only. The same stack also holds app-level actions from other surfaces (removing a composer attachment, a recipe edit, a mail-cleanup change), so Ctrl+Z reverses whatever was registered last, whichever screen it came from.
Where to find it
- Ctrl+Z anywhere in the app — not just the sidebar. Ctrl+Y redoes.
- The Undo toast, when you have turned it on: it appears right after the action and carries a clickable Undo button with the shortcut hint. The button is the focus-independent path — it works even when a text box has focus and Ctrl+Z would go to that box instead.
- Settings → Keyboard shortcuts — both keys are listed, rebindable, and the new binding shows up immediately in the toast hint and in the ? cheat-sheet.
The toast is off by default and has its own switches under Settings → Notifications:
| Switch | Covers | Default |
|---|---|---|
| Session actions | pause, unpause, snooze, move | Off |
| Session archived | archive from the row, menu or keyboard | Off |
| Deletions | item removals (most cannot be undone) | On |
Turning them off hides only the toast. Ctrl+Z keeps working either way.
How it behaves
How far back it goes. The history holds your last 25 undoable actions. Take a 26th and the oldest falls off the bottom. Redo works in the same way — but only until you do something new: a fresh action clears the redo chain, exactly like a text editor, so you cannot redo forward past a new decision.
While you are typing, the text box wins. If a text box has focus — a search field, a reply dialog, the chat composer once it holds text — Ctrl+Z undoes your typing there, because that box keeps its own undo. The app-level undo fires only when no text box is claiming the key. The chat composer is the one place that does both: with text in it, Ctrl+Z walks back your typing; once there is no typing left to undo, it falls through to the session-level undo. That is why the toast always carries a clickable Undo button — it is the one path that works regardless of where your cursor is.
Undoing a pause does not restart the agent. Pausing ends the running CLI process; the undo returns the row to ended rather than pretending a live agent came back. The session is exactly as resumable as any other finished one: send it a message and it picks up again. The same honesty applies when the undo is of an archive or a close — the row comes back, the process does not.
A send is on the history the moment you press it. The app moves you to the next session before the send finishes, so the "go back" step is recorded at once — a Ctrl+Z pressed while the send is still going already takes you back. If the send then fails or never moved you, the step is quietly removed again, and an Undo toast still on screen for it does nothing rather than reversing an older action. Removing it also gives back any Redo it had cleared, so a failed send never costs you an earlier Ctrl+Y. Permission prompts and approval cards move you only after the response comes back, so their step is recorded only then, and only if you really moved.
An archive is on the history the moment you archive. A cloud session can take a minute to finish archiving. Ctrl+Z pressed during that minute already belongs to the archive: you see "Undoing it as soon as it finishes", and the session returns the moment the archive is done. Pressing again while you wait does nothing, so it can never undo something older. If the archive fails, its step is removed and any Redo it cleared comes back. This holds for every way of archiving — middle-click, the X, the E key, swipe, the right-click menu, a selection, and Archive anyway.
Every other session action works the same way. Save and unsave, pause and unpause (from the session bar, the P key, the right-click menu, the phone's selection bar or Manage Sessions), unarchive, unsnooze, snooze and trickle, colour, mark read or unread, move, rename, dismissing a terminal and bookmarking all go on the history the instant you act. A Ctrl+Z pressed while one is still finishing waits for it and undoes that action, never an older one; if the action fails, its step is removed and you see the usual error. The Undo toast appears once the action is done and counts what actually happened.
A cloud session you archived can come straight back. Undo (or the Unarchive button) restores it even while its cloud machine is still shutting down. It returns as ended and starts again only when you send it a message.
Failed undos do not trap you. If the inverse action cannot be carried out, the entry has already been taken off the stack, so your next Ctrl+Z moves on to the action before it rather than retrying the same one forever.
Every open client sees the result. An undone action is applied through the same session writes as the original, so the row moves back on the phone as well as the desktop.
Related
- rename-a-session.md — renaming a session and undoing it with Ctrl+Z
- archive-a-session.md — archiving, the optional toast, and the composer's text-undo precedence explained in full
- snooze-a-session.md — snoozing a session and the early-unsnooze path
- pause-or-stop-a-session.md — why undoing a pause returns a row to "ended" instead of a live agent
- save-a-session.md — saving and unsaving, both registered on the same stack
- move-a-session.md — the move's exact Undo and the record it restores from
- keyboard-shortcuts.md — rebinding Ctrl+Z / Ctrl+Y and the ? cheat-sheet
Last verified 2026-10-14