Sessions and forks
The sessions list, session details, and forking, editing or deleting a message in the terminal app.
What sessions, forks and spaces are in both apps: one engine, two apps.
The sessions list#
Esc in a chat opens the list: the current project's sessions, newest first, with turn, message and run counts. Settings › UI › All projects opens it on every project.
| Key | Does |
|---|---|
| Type | Filter by title and message text |
| ↑ ↓, PgUp PgDn | Move |
| Enter | Open the session, or start one on the + new session row |
| Tab | Switch scope: current project, all projects, then the sessions a window has open now (with the daemon or a remote host) |
| ShiftTab | Next space, also while you type a search. It wraps after the last space. With Settings › UI › Spaces on or a space from an extension. Rebind it as cycleSpaceInList (keyboard map) |
| ← → | Previous and next space |
| CtrlF | The view of the list: grouping, sort and filters (below) |
| CtrlShiftX | Details of the highlighted session |
| CtrlR | Retry a session whose environment failed to start |
| Esc | Back to the open chat, or quit |
When there is another space, the title shows the space between arrows, like ‹ Work ›. Click it to show the next space. The footer shows the key, shift+tab space by default.
CtrlN in a chat starts a new session with the same provider and model.
What a row shows#
| Mark | Means |
|---|---|
▶ | The highlighted row |
● | The session open in this window |
◆ | The Main session, always first |
★ | A favorite. Favorites stay at the top. |
| Spinner | After the title: a run is streaming |
◉ | Pulses after the title: the session waits for your answer |
○ | After the title: another window has it open, idle |
| Badges | Artifacts and extension badges. Right-click one for its actions. |
The marks after the title come from presence, which needs the daemon.
An extension can add a glyph before the title, and a line of text and chips under the counts, such as the session's branch. It can also add rows of its own, such as a ticket or a scheduled job, with the sessions it lists under them. Enter or a click opens such a row, and CtrlShiftX shows its actions.
Extensions can pin lines of their own between the search box and the list, and right under the list, such as an inbox count. They stay in place while the list scrolls, and a click runs what the extension set.
The view of the list#
CtrlF on the sessions list opens its view. Each row cycles its value with ← →, and a change applies at once.
| Row | Choices |
|---|---|
| Group | None, Agent, Project, State, the groupings extensions add, and Space default when the space has its own |
| Sort | Recent, Created, A–Z, the sorts extensions add, and Space default when the space has its own |
| Agent | All, then each agent by name |
| Extension filters | One row per filter an extension offers in the space: Off or On, or one of its choices. A filter with several choices gets one Off or On row per choice |
| Reset view | Back to the space's defaults |
| Save view as space… | Asks for a name, then adds a space that lists the sessions the view keeps, and turns Spaces on |
Each space keeps its own view.
Spaces from extensions#
An extension can add spaces. They show next to yours, even with Settings › UI › Spaces off. Such a space lists the sessions the extension chose, plus the sessions started in it. A session started there is tagged with the space and can start on the extension's agent and model. Sessions tagged with an extension's space leave Default, and come back to it when the extension goes. To hide one, add an entry with its id and hidden: true to the spaceList setting.
Hosts and environments#
With remote hosts on, the list groups sessions under each host with a status dot (connected, connecting or offline). A new session asks which host, and on a server, which of its folders (this computer keeps the window's folder).
On this computer, Settings › Agent › Environments picks local, OS sandbox, git worktree or a sandbox provider (execution contexts).
Session details#
CtrlShiftX shows the current session's id, dates, folder, counts, token totals, environment and space.
| Action | Keys | Description |
|---|---|---|
| Delete | KeysD | DescriptionDelete the session (press twice). |
| Copy id | KeysC | DescriptionCopy the session id. |
| Generate title | KeysG | DescriptionTitle the session with the current model. |
| Export md | KeysE | DescriptionExport the session as Markdown under .{prefix}/sessions/. |
| Export json | KeysJ | DescriptionExport the session as JSON under .{prefix}/sessions/. |
| Compact | KeysK | DescriptionSummarize older turns to free context. |
| Space | KeysS | DescriptionMove the session to the next space (needs Spaces). |
| Favorite | KeysF | DescriptionAdd the session to favorites, or remove it. |
| Move | KeysM | DescriptionMove the session to another environment or machine. |
| Detail | Behavior |
|---|---|
| Delete | Press the key twice |
| 1 to 9 | Run the environment's own actions, when it lists some |
| Rename | No free-text rename. G writes a title from the conversation. Settings › Agent › Auto-update session titles names new sessions after their first exchange (automatic titles). |
| Export | To <git root>/.zidane/sessions/<id>.md (or .json), or sessions/ in the data folder outside a git repository |
| K | Compact older turns now (compaction) |
Fork, edit or delete a message#
When the agent is idle and nothing waits for approval, CtrlS (or ? on an empty prompt) selects a message. ↑ ↓ move, Enter opens it.
| Action | Keys | Description |
|---|---|---|
| Fork | KeysF | DescriptionFork the session at this turn (press twice). |
| Delete | KeysD | DescriptionDelete this turn (press twice). |
| Copy | KeysC | DescriptionCopy this turn. |
| Edit | KeysE | DescriptionEdit this turn's text. |
Fork and delete need two presses.
| Action | Result |
|---|---|
| Fork | A new session with every turn up to and including this one. You land in the fork. The original stays as it was. |
| Delete | Removes this turn, and tool calls left without their result. You stay in the session. |
| Copy | Copies the text through the terminal (OSC 52). Some terminals do not support it. |
| Edit | Rewrites the text of the turn. Tool calls and thinking stay. Enter saves, ShiftEnter adds a line, Esc cancels. |
To try another direction, fork at an earlier message and send a new one. What a fork keeps (folder, model chain, effort, space, environment): one engine, two apps.
Reference#
- Sessions: the session model in the SDK
zidane/session