Skip to main content
The mux is the F[no] terminal multiplexer. A mux server runs your panes, and the mux client is the window on your screen. Each pane wears a frame: a border whose two edges carry facts about that pane. The bottom edge names the machine and the directory the pane runs in. A narrow pane can drop fields, and an old server can send none. The frame also has a memory side: each pane keeps its last 10,000 lines of output by default. The mux calls this history the scrollback. Each kept line costs memory in every column of the pane. After this page, you can name every field on a pane frame. You can also predict what a narrow pane drops, and set the history cap.
Note: These features are recent. The 0.4.7 release and the 0.4.8rc1 and 0.4.8rc2 pre-releases do not include the machine and directory fields or the 10,000-line default. Check your version with fno --version.

Before you start

Install F[no] through the quickstart. Open the mux with fno, and create a workspace, as described in Create a mux workspace and start a session.

What the frame shows

A pane of at least 20 columns and 4 rows wears a frame. A smaller pane keeps the plain divider with no fields.
Two stacked mux panes. The top frame reads docs-mbp:~/code/footnote on its bottom edge, and the bottom frame reads docs-mbp:~/code/footnote/crates
The pane’s name sits in a tab at the top left. The other top fields sit at the top right: the observers count, then the status, then the model. On the bottom edge, the node and the branch sit at the left. The machine, the directory, and the context sit at the right. An agent session is a pane where a coding agent runs. The tables below mark the fields that only an agent session carries. The top edge carries the session’s facts: The bottom edge carries: The machine and the directory sit together on the bottom edge, joined by a colon: docs-mbp:~/code/footnote. The directory field reads the shell’s live directory, not the folder the pane started in. Type cd in the pane. The frame updates at the next layout change, such as after a pane opens, closes, or moves, or after the focus moves between panes. A focus move forces the update at once. The client abbreviates your home folder to ~. A plain shell pane shows the machine and the directory too. It carries no node, branch, context, or model field.

What a narrow pane drops

While a pane wears a frame, the frame drops whole fields in a fixed order. It never cuts a field mid-word. On the bottom edge, the context drops first, then the machine, then the directory, then the branch. The node name is last: it shortens to fit. On the top edge, the model drops first, then the status word, then the pane’s name shortens. The observers count always stays. To give a pane more width, resize it as described in Set mux keys and resize splits.

How much history a pane keeps

Each pane keeps its last 10,000 lines by default. When a pane produces a new line past the cap, it drops its oldest line. The cap is a memory decision, and the cost grows with the pane’s width. A kept line costs every column of the pane, so a 200-column pane costs about 2.5 times an 80-column pane. At 80 columns, 1,000 kept lines cost about 2 MB per pane. In a measured run, 16 panes that each kept 100,000 lines held 3,207 MB in the mux server. At the 10,000-line default, the same panes held 339 MB. The numbers are medians of 30 samples on macOS, measured with the mux_footprint example described below. The cap also bounds how far fno mux pane read --lines reaches into a pane’s history.

Set the scrollback cap

mux.scrollback_lines is an integer. Its default is 10000, and the smallest value is 1. The config refuses smaller values. Set it in the [mux] block of your config.toml:
~/.fno/config.toml
The mux server reads the cap once at startup. A config change applies to the next server, not the running one. One command sets it:
The command prints the key, the value, and the file it wrote. It writes the [mux] block of your global config.toml, ~/.fno/config.toml. Check the stored value at any time with fno config get mux.scrollback_lines. To edit the file by hand instead, write the same lines into it:
~/.fno/config.toml
Then restart the server:
The command ends the server and prints a receipt. A keeper is a helper process that keeps a pane’s shell alive while no mux server runs. A pane that a keeper holds survives the restart, and the receipt names it:
In the receipt, graceful means the server shut down on request. The child number is the pane’s shell process, and the keeper number is the helper holding it open. A pane without a live keeper makes the command refuse. The refusal names each such pane and offers fno mux kill-server main --end-unkept to end them deliberately. Ending a pane closes its shell. Start the mux again with fno. The new server adopts the kept panes again and reads the new cap. A kept pane keeps its scrollback history across the restart. You can also set the FNO_MUX_SCROLLBACK_LINES environment variable before you start fno, for example export FNO_MUX_SCROLLBACK_LINES=20000. It overrides the config key for the server that start spawns. A value of 0 or less in the environment keeps the default.

Measure pane memory

The mux_footprint example measures what panes cost in memory on your machine. It needs a source checkout of F[no]:
It starts a private mux server and fills each pane with the named number of lines. It prints one line per owner group: the mux server, the keepers, and the shells. The medians vary by machine:
On macOS it reads the physical footprint. Other systems read resident memory. --scrollback N sets the cap for the measured server, so you can compare caps directly.

No machine or directory on the bottom edge

The bottom edge shows node · branch, but no docs-mbp:~/... span, after you update F[no]. A mux server from your old build is still running. An old server does not fill these fields. The client cannot invent them. What to do:
  1. Restart the mux server as described in Set the scrollback cap. The new server fills the fields.
  2. Check the bottom edge again after the mux opens.

Next steps