Work With Sessions
| Task | Key (default) | Slash command | Command line |
|---|---|---|---|
| Start a session | Type on home, return |
— | mbm2 |
| New session | <leader>n |
/new (/clear) |
— |
| Switch session | <leader>l |
/sessions (/resume, /continue) |
mbm2 -s <id> |
| Continue the latest | — | — | mbm2 -c |
| Rename | ctrl+r |
/rename |
— |
| Delete | ctrl+d twice, in the session list |
— | — |
| Jump to a message | <leader>g |
/timeline |
— |
| Fork | unbound | /fork |
mbm2 -s <id> --fork, mbm2 -c --fork |
| Compact | <leader>c |
/compact (/summarize) |
— |
| Undo / redo a message | <leader>u / <leader>r |
/undo / /redo |
— |
| Export to a file | <leader>x |
/export |
mbm2 export <id> (JSON) |
| Import a session | — | /import |
mbm2 import <file> |
| Copy the transcript | unbound | /copy |
— |
| Copy the last reply | <leader>y |
— | — |
| Share / unshare | unbound | /share / /unshare |
— |
| Interrupt a running turn | esc |
— | — |
| Project log and session steps | — | /todo |
mbm2 todo list |
| Recap what happened while you were away | — | /recap |
— |
<leader> is ctrl+x unless you changed it (Keybindings). Every row is
also in the command palette (ctrl+p). Sessions are stored by the runtime, not by mbm2.
Start, Leave And Continue
- Run
mbm2in the project. The home screen opens; no session exists yet. - Pick a model (
<leader>m) and an agent (tab) if the defaults are not what you want. - Type the request and press
return. The session is created by this first submit and named by the runtime.
On exit mbm2 prints what you need to come back:
Session Add retries to the cart fetch
Continue mbm2 --attach https://runtime.example.com --dir /srv/shop-api -s ses_…
| Reopen | How |
|---|---|
| The newest top-level session | mbm2 --continue (-c) |
| A known session | mbm2 --session <id> (-s); an unknown id exits with an error instead of opening an empty session |
| Inside the client | <leader>l or /sessions; typing in the list searches on the server |
-c, -s and --fork open the session in the main tab, in front of any worker tabs restored
for the project; the tab bar, shift+tab and new worker tabs keep working.
Start with an agent, a task or a project
mbm2 ~/src/shop-api # the project path, as in v1 (same as --dir)
mbm2 ~/src/shop-api --agent plan # start on the plan agent
mbm2 --prompt "List the TODOs in internal/cart" # send this as soon as a model is ready
mbm2 -c --prompt "Continue with the tests" # waits until -c has opened the session
--prompt is sent only if you have not edited it in the meantime. Unknown agents answer
Agent not found: <name>, unknown models Model <provider>/<model> is not valid
(Command line).
The session list
<leader>l opens Sessions as a dialog over the screen you are on; the session behind it
stays drawn. The hint row names the keys bound to delete and rename.
| Key | Does |
|---|---|
| Typing | Searches titles on the server |
up / down, the wheel, a click |
Move, scroll, pick |
return |
Opens the session (from another workspace: the client moves into that workspace first) |
ctrl+r |
Renames |
ctrl+d, then ctrl+d again |
Press ctrl+d again to confirm, then deletes; a failure toasts Failed to delete session with the server's reason |
esc |
Closes the list: you are back in the session you came from, draft included |
esc on an idle session does nothing (it interrupts only a running turn), so a stray esc never
leaves your session. A session that fails to load toasts the server's message and returns to home.
Rename
ctrl+r (or /rename) opens Rename Session with the current title. Edit it, return saves.
Jump To A Message
<leader>g (or /timeline) opens Timeline, one row per message you sent. Choose one and
Message Actions offers:
| Action | Description it shows | Effect |
|---|---|---|
Revert |
undo messages and file changes | As <leader>u, back to before that message |
Copy |
message text to clipboard | Copies your message |
Fork |
create a new session | As /fork from that message |
Fork
A fork is a new session that starts from a copy of an existing one. Use it to try a second approach without losing the first.
- Run
/fork. Fork session listsFull sessionfirst, then your earlier messages, newest first. - Choose
Full sessionto copy everything, or a message to fork just before it. A message fork puts that message's text back in the prompt so you can change it and resend. - The client opens the fork. The original session is unchanged.
mbm2 -c --fork # fork the newest session, then open the fork
mbm2 -s ses_… --fork # fork a known session
--fork alone fails with --fork requires --continue or --session.
Compact
A long session costs context. <leader>c (or /compact) asks the runtime to summarise the
session with the current model; later turns continue from the summary. While it works, the
status reads compacting. Without a model the client shows
Connect a provider to summarize this session and sends nothing.
Undo And Redo
| Step | Result |
|---|---|
<leader>u |
Stops a running turn, then moves the session back to before your last message; that message's text and attached files return to the prompt |
<leader>u again |
Moves back one more user message |
<leader>r |
Moves forward one user message; past the last one, the revert is cleared and the prompt is emptied |
Example: the agent took a wrong turn on your last request.
<leader>u. Your last message is back in the prompt; the transcript ends before it.- Edit the request, for example add
do not touch the public API, and pressreturn.
The runtime performs the revert, and Message Actions describes Revert as undoing messages and
file changes. Unverified: exactly which file changes the runtime restores.
While a revert is active the transcript ends in a revert box. Click it: Confirm Redo asks
Are you sure you want to restore the reverted messages?; confirming runs /redo.
Click In The Transcript
| Click | Does |
|---|---|
| Tool output cut short | Expands it |
| A task (subagent) block | Opens that subagent's child session |
| One of your messages | Message Actions: Revert, Copy, Fork |
| The revert box | Confirm Redo |
Hovering tints what a click would act on. A drag anywhere still selects text.
Subagents
When the agent delegates, the turn shows a task block and, below the turn, a hint such as
<leader>down view subagents. <leader>down (or a click on the task) opens the child session.
A child session draws a three-row subagent footer: its label, N of M among its siblings, its
token usage with the context percentage, and clickable Parent, Prev and Next with their keys
(up, left, right by default).
A subagent's permission requests and questions appear in the parent session, in place of the parent's prompt, so you can answer them without opening the child (Permissions and questions).
Copy
| What | How | Toast |
|---|---|---|
| The last reply | <leader>y (palette Copy last assistant message) |
Message copied to clipboard! |
| The whole transcript as Markdown | /copy |
Session transcript copied to clipboard! |
| Any text | Drag with the mouse; the selection is highlighted while you drag and releasing copies (copy_on_select, on by default except on Windows) |
Copied to clipboard |
Any text, with copy_on_select off |
Drag, then ctrl+c or a right click |
Copied to clipboard |
What A Drag Selects
A drag selects inside the thing you pressed on, and copies that thing's own text:
| You press on | A drag selects | What is copied |
|---|---|---|
| A paragraph | Text in that paragraph; past its end, the paragraphs, tables and code blocks after it, one by one | The rows as shown, joined with newlines, no trailing spaces |
| A table cell | Text in that cell; down the table, the cells of that column; across, the cells between the two you dragged over | Each table row's cells separated by tabs, rows by newlines, no borders |
| A code block or a tool's output | Text in that block | The code with its indentation; a line the screen wrapped is one line; no bar, line numbers or diff signs |
| The prompt | Text in the prompt | What you typed; a wrapped line is one line |
| The sidebar or a dialog | Text in that section or panel | Its text |
| A toast or the which-key popup | Only its own text (a wrapped message is one line), never its border or what is behind it | Its text |
A toast stays while the pointer is over it. A message too long for its box ends in … and shows a
copy word: click it, or press c while the pointer is over the toast, to copy the whole message
(Copied to clipboard).
A drag never runs sideways into the ┃ bar of a message or the prompt, the sidebar, or the other
pane of a split: moving past the edge keeps the selection on the rows it is level with. A press on
a border, a bar or the blank space between two blocks selects nothing.
| Clicks | Selects |
|---|---|
| Double-click | The word under the pointer |
| Triple-click | The paragraph, or one line of a code block or a tool's output |
The highlight covers only the selected text, not the padding around it.
Copies use the terminal's OSC 52 sequence plus a local clipboard tool, so they reach your own
computer over SSH. Inside tmux, copying needs set -g allow-passthrough on
(Troubleshooting).
Export
-
Press
<leader>x(or/export). Export Options opens:Export Options Filename: session-ses_3f9a.md > [x] Include thinking [x] Include tool details [ ] Include assistant metadata [ ] Open without saving Format: Markdown Press space to toggle, return to confirm, tab for options -
tabmoves between fields,spacetoggles a switch or changesFormat:Markdown,HTML(one self-contained.htmlfile) orJSON (session export document). -
Press
return.esccancels.
The file is written to the current working directory, the toast says
Session exported to session-ses_3f9a.md, and it opens in $VISUAL (else $EDITOR).
Open without saving skips the file and opens the editor only. With neither variable set the export
reports Failed to export session. The file name defaults to session- plus the first eight
characters of the session id. Include thinking and Include tool details start as the transcript
shows them now (/thinking, Show tool details). The include switches do not change a JSON export.
A JSON export is the same document the runtime's CLI prints, so it can be imported again:
mbm2 export ses_… > cart-retries.json # from a terminal, through the bundled runtime
mbm2 import cart-retries.json
Import
/import opens Import Session and asks for Export file (JSON) or share URL:. Type a path such
as cart-retries.json or paste a share link and press return; the runtime checks the whole
document before it stores anything and the toast names the result, for example
Imported "Add retries" (14 messages) as ses_….
The bundled engine offers it: the imported session is a new session of the folder you run mbm2 in,
with new ids, so importing one file twice keeps two sessions, and it is in the session list at once.
A file's approved rules and permission mode are not imported. A share link the engine cannot read
says why, for example Import failed: Share not found or empty: <slug>. With a runtime that does not
offer it (an older one), /import says
This runtime cannot import sessions here; run `mbm2 import <file>` in a terminal.
mbm2 import keeps the document's own ids, as v1 does, and adds only what a session it already
has lacks.
Share
-
Run
/sharein the session. The first time on this machine a dialog asks:Share Session Are you sure you want to share it? [Cancel] Confirmleft/rightmove toConfirm,returnanswers. -
The runtime creates a read-only link and the client copies it. The toast shows the link itself and stays 8 seconds, so you can read it, or copy it by hand when no clipboard is available (
Failed to copy URL to clipboard:with the link):Share URL copied to clipboard: https://tui.mbm.mn/share/<id>A link wider than the toast wraps onto the next rows instead of being cut off. v1 showed
Share URL copied to clipboard!without the link for 5 seconds. -
/shareagain copies the same link (the palette row reads Copy share link); palette Open share link opens it in a browser;/unsharewithdraws it:Session unshared successfully.
Sharing mode (palette Sharing settings, runtime config share) |
Effect |
|---|---|
Manual (default) |
Share sessions only on request |
Auto |
Share new root sessions automatically |
Disabled |
Do not create share links; the share commands are hidden |
The choice is written to the runtime and confirmed with Sharing set to auto (or the mode you
picked) for 8 seconds. MBM_DISABLE_SHARE=1 in the runtime's environment turns sharing off.
The link's host is chosen by the runtime that mints it; the v2 form is https://tui.mbm.mn/share/<id>.
Unverified: whether your runtime already mints that form rather than its own web address (ADR 0203 O5).
To share inside your own network instead, set share_base_url in mbm.json (or MBM_WEB_URL in
the engine's environment) to the address of your mbm web UI. A link is then
<share_base_url>/<folder in base64url>/session/<id>, nothing is sent to a share service, and
/unshare only forgets the link. MBM_WEB_UI_BASE=/mbm adds the path the web UI is served under:
{ "share_base_url": "http://build-box:4096" }
The Todo Panel
/todo (palette Todo) opens one list in two parts: the project work log the runtime keeps in
docs/todo/current.md, by section, and the steps the agent wrote for this session.
Todo esc
Project log · Client
☐ Wire the strip P2
☑ Read ADR 0288 P3
Session steps
◐ Draw the steps above the prompt in progress
☐ Write the panel pending
check space add a edit e promote p archive A
| Key | On | Result |
|---|---|---|
space or x |
A log item | Checks or unchecks it in current.md |
a |
Anywhere | Asks for the words, then adds an item to the log |
e |
A log item | Asks for new words, with the old ones filled in |
p |
An open step | Adds the step to the log; the session keeps it |
P |
Anywhere | Adds every open step that is not already in the log |
A |
Anywhere | Asks a topic, then moves the checked items to history/<date>-<topic>.md; unchecked ones stay |
tab |
Anywhere | Jumps to the other part |
Nothing reaches the log on its own: steps are only promoted when you press p or P. A runtime without the
project log (a v1 server, or an older mbm2 runtime) shows project log not available on this engine, and the
steps are still listed. When mbm2 starts and offers Work to continue, the dialog also names the open log
items, Project log 3 open: Wire the strip · Write the panel; return on that row opens /todo.
Recap When You Come Back
Leave a session working — switch to another window or another tab — and come back five minutes or more later: if a turn finished, a job ended, a turn is still running or something waits on you, a short recap appears at the end of the transcript.
※ recap: Fixed the parser bug in parse.go; all 12 tests pass.
job_1 still runs the integration suite; nothing waits on you.
| Question | Answer |
|---|---|
| What counts as away | The terminal losing focus (terminals that send focus reports; most do) or another tab in front. A terminal without focus reports counts only tab switches |
| When it does not appear | Back sooner than recap_after (5 minutes); nothing happened while you were away; you are not on the session screen; the runtime is not v2's |
| Who writes it | The session's small model (small_model in mbm.json, the one titles use, else the session's model) from the messages since you left, the job list and the open items of the project work log (Todo lists). If the model fails, a plain recap from the last reply, the jobs and Project log: N open: … is shown instead |
| Ask for one now | /recap. ※ recap: writing a recap… shows until it lands; /recap again cancels it, and so does sending a prompt |
| Does the model see it | No. It is never sent in a later turn, does not count toward the context, and is left out of /export, /copy, mbm2 export and shares |
| After a restart | Kept with the session: reopening it shows the newest recap again, after the message it was written at |
| Turn it off | /config → Recap on return, or "recap": false in mbm2.json; /recap keeps working. "recap_after": 15 waits 15 minutes (Configuration) |
Show Or Hide Parts Of The Transcript
| Toggle | How |
|---|---|
| Timestamps | /timestamps |
| Thinking blocks | /thinking |
| Tool details | Palette Show tool details / Hide tool details |
| Code concealment | <leader>h; off shows replies as their Markdown source, markers included |
| Sidebar | <leader>b |
| Scrollbar | Palette Toggle session scrollbar |
The choices are kept in kv.json and shared with v1.
The Right Column
<leader>b shows the sidebar. Its top stays where it is: the title, the context use, MCP, LSP and the
todo list never scroll. Only the changed files below them scroll.
| You do | What happens |
|---|---|
| Wheel over the top | Nothing |
Wheel or scrollbar over the files; pgup/pgdn with the pointer over them |
The files move; with the pointer elsewhere the keys scroll the transcript |
| Files overflow | A pager line ‹ 1/3 › sits under them; click ‹ or › to turn the page |
| A long todo list | Past about 60% of the column's height it scrolls inside its own box, keeping the current step in view |
The files section reads Modified · 42 files · +1,203 −388 and lists the 8 most recently changed files.
Click +N more to show the rest in place (show less folds them). Above 20 files they are grouped by
folder, internal/app/ (12); click a folder to fold it. Below 120 columns the sidebar is hidden unless
you open it.
Read While A Reply Streams
| You are | What the transcript does |
|---|---|
| At the bottom | Follows the reply as it arrives |
Scrolled up (pgup, the wheel) |
Holds still: the lines you are reading do not move, even when a tool call above them finishes. Once new text arrives below, the last line shows new output ↓ |
Back at the bottom (pgdown or the wheel) |
Follows again; the mark goes away |
A reply that arrives fast is drawn at most about sixty times a second, and keys you type are handled in between, so typing does not wait for the reply. A tab you are not looking at keeps receiving its reply and draws it when you switch to it.
Not Yet Available
| Feature | State |
|---|---|
| Choosing which messages a share includes | Not offered; a share is the whole session |
Published from revision f88fc66f 2026-11-30