Reference·Sessions and undoIndex

Sessions and undo

Session ids, resume, rename, export, fork, the session tree, undo, crash recovery and throwaway stores.

.mdllms.txt

A session is one conversation in the store, ~/.nodecode/history.db.

Session ids

IdSession
s- and up to 8 letters or digitsA session the shell opened. Example: s-K3F9Q2ZA.
s-GATEWAYThe boot session of the background gateway.

Cells name their own sessions. A session nobody typed in is never stored.

List and resume

DoHow
List sessions/sessions, /agents or Ctrl+S.
Leave a session runningPress Left on an empty composer. The picker opens.
SwitchSelect a row. Press Enter.
Rename in the pickerPress F2 on a row.
Fold or unfold forksLeft and Right.
Resume from the command linenodecode resume SESSION-ID
Pick from the command linenodecode resume. The picker opens on the sessions begun in this folder.
Continue the last session herenodecode -c. The newest session begun in this folder.
See what waits on youThe web page's Sessions list: under a session whose answer asked you something, its question; its last turn failed when it did. A stopped turn waits on nobody.
a shell
nodecode resume s-K3F9Q2ZA
nodecode resume
nodecode -c -- "run the tests again"

The shell prints the resume line when it exits: To resume: nodecode resume SESSION-ID, then --store PATH when it ran with --store or --ephemeral. resume needs a terminal.

Rename

/rename shows the session's name and offers two rows.

RowDoes
Type a new nameAsks for the name. One line, 64 characters at most.
The name the first prompt makesGives back the first prompt's line.

A session has no name before its first prompt. Then it wears that prompt's first line, until the auxiliary model writes it a title of three to seven words. A prompt of five words or fewer is its own title. A name you give first wins.

Export

/export saves the session as Markdown: in this shell's folder, or in a folder or at a file it asks for. It works in the shell only.

RowFile written
Save it in this folderA file named after the session, in the shell's folder.
Save it somewhere else, given a folderThat file name, inside the folder.
Save it somewhere else, given a file pathThat path.
In the fileLeft out
Prompts, answers, plans, one line per callReasoning, the output of calls

Clear

Where/clear or /new does
ShellOpens a fresh session in the shell's folder. The old session stays in /sessions.
Web page, chat room, eval/clear moves this session back to its start. /redo returns. The web page takes /clear only: /new there goes to the model.

Fork

/fork opens a new session at the current head. The shell switches to it.

RuleDetail
HistoryThe fork reads the parent's turns up to the fork point. Nothing is copied.
Later parent changesA rewind in the parent does not change the fork.
FolderThe fork works in the parent's folder.

Tree

/tree shows the session as a tree of turns. Alias: /checkpoints. Esc twice within 0.5 seconds opens it too.

KeyAction
TypingSearch the rows.
RightShow the tool calls of a turn.
LeftHide them.
Enter on a turnOpens the options below.
Enter on a tool callMoves the head to that turn. Restores files to where that turn ended.
OptionResult
Continue from this turnThe head moves to the turn. Its answer is kept. New turns branch from it.
Rewind to before this messageThe head moves before the turn. The prompt returns to the composer.
Rewind to before this message + code changesThe same, and the files are restored. Offered when a snapshot exists.

The head row offers the rewinds only.

Undo and redo

CommandDoes
/undoRewinds the last turn.
/redoReturns to the branch the last rewind left.
Where/undo restores
ShellThe conversation and the files.
Web page, chat room, evalThe conversation only.

A rewind is refused while a turn runs, in the shell too: a turn is in flight; cancel or await it first.

A rewind deletes nothing. It records a head move. The branch you left stays in /tree.

Workspace snapshots

Nodecode captures the session's folder at turn and tool boundaries. Undo restores files from these captures.

FactValue
RepositoryA bare git repository at <cwd>/.nodecode/workspace_snapshots.
ToolThe git command. Without git there is no capture. The turn still runs.
ScopeFiles under the session's folder. Writes elsewhere are not captured.
RestorePer file. A file changed by something else is left alone. The web page reports the conflict; the shell does not.
Your repository.nodecode/ can show in git status. Nodecode does not add it to .gitignore.
Off switch"workspace": { "captures": false } in the config. Applies at the next start.

After a crash

FactDetail
Open turnsEach interrupted turn resumes at the next boot.
Unanswered tool callsEach gets the result interrupted by process restart.
LimitA turn is resumed on up to 3 boots. Then it is marked failed.
CostA resumed turn calls the model again.
CancelEsc stops a resumed turn like any other.

Ephemeral

a shell
nodecode --ephemeral
FactDetail
StoreA new file: nodecode-ephemeral-<pid>.db in the temp folder (TMPDIR).
Still sharedConfig, layer, cells, memory and skills are the home's.
LayerThe layer is the set of definitions the agent wrote and kept. New ones still land in it.
ChannelsChannel bots do not start.
Refused withserve, resume and --store.

For a throwaway organism, a whole running Nodecode with its own home, run HOME=$(mktemp -d) nodecode.

Esc

    Loading the index…

    ↑↓ moveEnter openEsc close