Sessions, tiles and tabs
Create sessions with their own working directory, split them into tiles, manage tabs, the primary pane rule, closing and reopening closed sessions.
On this page
A session is one row in the sidebar: a working directory plus a layout of terminals and other tabs. Some menus and actions call it a group ("Pin group", "Close group"); it is the same thing. Each session's layout is a split tree of tiles (panes), and each tile holds one or more tabs. Everything you open in a session starts in its working directory.
Create a session
- Press
⇧⌘N, click New session under the Sessions caption, or run New session… from the command palette. - Repository: pick the directory. The list shows Favorites, then Recents (the last 8), then All: your home folder
~,~/srcand every folder directly inside~/src, with git repos marked. Type to filter by name or path. Click a row's star to make it a favorite. - Base (git repos only): pick what to open.
- new branch off default: a new git worktree on a new branch from the default branch (made with drop).
- repo root (no worktree): the repository itself.
- An existing worktree, or a local or remote branch.
- Layout (only when the directory has workspace profiles in
.flowspace.json): "Default — single pane" or a saved profile. See .flowspace.json. - Label: No label, an existing label, or "New label…" (named from what you type). See Labels and spaces.
- Review the summary and press
↩to create the session.
In the flow, ⌫ on an empty query goes back one step, and clicking a step's chip jumps back to it.
Favorites and recents are saved in ~/Library/Application Support/flow/groups.json.
The command a new session runs
A new session's primary pane runs the Primary command: Settings › General › Sessions › Primary command (session.primary_command, text, default claude). Set it to another agent CLI, or to an empty value for a plain shell. You can override it per repository (it is a personal setting: a team file in a repo cannot set it); see Settings scopes.
The primary pane rule
Every session has a primary pane, and Flow keeps one layout rule for it:
- With one tile, that tile is the primary.
- With more than one tile, the primary is the left column and every other tile sits to its right.
- The primary holds exactly one tab. A new tab opened from it moves into a tile on the right, and focus follows it.
- The primary has no tab strip. Its header shows the branch, the title with its folder button and the pull request; see Interface tour.
- The primary's tab cannot be dragged, take a dropped tab, or pop out.
Working directory
Each session has its own working directory. Every new tab and split in it starts there; a tab you drag in from another session keeps its own shell and directory.
To change it:
- Click the folder button in the primary pane's title chip (or right-click it and choose Change directory…, or run Change directory… from the palette).
- Type a path:
~and~/…, a path relative to the current directory, and./..all work. The directory must exist. - Press
↩.
New tabs and splits start in the new directory. Open panes stay where they are, except the primary: if its shell is sitting at a bare prompt (no command running), Flow types a cd into it. Right-click the folder button and choose Copy path to copy the directory.
Tabs
| To | Do |
|---|---|
| Open a tab in the focused tile | ⌘T, or the "+" at the end of the tab strip |
| Always open a terminal | Right-click "+" and pick Terminal, or run New terminal |
| Switch tabs in a tile | ⇧⌘[ / ⇧⌘], or click |
| Pin a tab | ⌥⌘P or the tab's right-click menu. Pinned tabs sort to the front, keep their full title and cannot be closed until unpinned. |
| Move a tab | Drag it along the strip to reorder, onto another tile's strip or middle to move it there, onto a tile's edge to split it out, or onto a session row in the sidebar to send it to that session |
| Close a tab | ⌘W or its × |
The New tab launcher
With Settings › General › Tabs › New tab set to Ask (tabs.new_tab: ask, the default, or terminal), ⌘T, the "+" and a new split open a New tab launcher instead of a terminal. Type and press ↩:
| You type | It opens |
|---|---|
| Nothing | A terminal |
A URL (https://…, localhost:3000, example.com) | A web tab (web tabs experiment on) |
#123 | That pull request |
A path with no spaces (/…, ~/…, ./…) | A Files tab (an executable or missing path runs as a command instead) |
| Anything else | A terminal running it as a command |
Or pick a tab type: ⌘1 Terminal, ⌘2 Web, ⌘3 Pull request, ⌘4 Files, ⌘5 Notes, ⌘6 Run, ⌘7 Shells. With web tabs off there is no Web tile and the rest move up (⌘1 to ⌘6). The launcher also lists run commands from the repo's .flowspace.json and its run providers (⌥1 to ⌥9 launch the first nine; see Run providers) and recent web pages. Set New tab to Terminal to get a plain terminal every time.
Tab kinds
| Kind | What it is |
|---|---|
| Terminal | A shell or program on a terminal |
| Web | A web page (Web tabs) |
| Pull request review | A PR's summary and changes (Pull requests) |
| Files | A read-only browser of the session's directory (Files) |
| Notes | The session's notebook of Markdown pages (Notebooks) |
| Shells | The shells an agent ran in this session (Persistent sessions) |
| Details | An agent's context card expanded into a page |
| New tab | The launcher above, which turns into one of the others |
Splits and focus
| To | Do |
|---|---|
| Split the focused tile side by side / stacked | ⌘D / ⇧⌘D |
| Resize | Drag the divider between tiles |
| Move focus to the next / previous tile | ⌘] / ⌘[ |
| Move focus left / down / up / right | ⇧⌘H / ⇧⌘J / ⇧⌘K / ⇧⌘L |
| Fold the focused pane, or unfold it | ⌥⌘M, or the pane's – button |
| Fold every other pane (focus mode), or unfold them | ⌥⌘F, or the pane's ⤢ button |
A folded pane takes no space and becomes a gutter pill on the seam it folded onto; click the pill to unfold it. Folding never changes the split ratios, so unfolding restores the layout exactly. When pills pile up on one seam they combine into one pill with a chooser, past the number set in Settings › General › Panes › Combine collapsed panes (panes.combine_pills: 2, 3 (default), 4 or never).
Switch sessions
- Click a row in the sidebar.
⌘1to⌘9jump to the Nth entry in the sidebar (a session group counts as one).⇧⌘↑/⇧⌘↓step through the sidebar's tool rows and sessions.- Switch session… in the palette lists every session and tool.
The session menu
Right-click a session row for:
| Item | Does |
|---|---|
| Mark as unread | Puts the unread dot back on the primary pane |
| Pin group / Unpin group | Moves the session into or out of the Pinned section. Pinned and snoozed exclude each other. |
| Snooze | Parks the session until a condition (Notifications and snooze) |
| Babysit | Has the Flow agent watch the session (Flow agent) |
| Session group items | New group with this session, Add to / Move to group, Remove from group (Session groups) |
| Close session | Closes it after a confirm |
| Labels | One checkable row per label |
Close tabs and sessions
⌘Wcloses the active tab. A pinned tab does not close. Closing a tile's last tab closes the tile.⌘Won the primary pane's tab,⇧⌘W(Close group), or Close session in the row menu closes the whole session after a confirm.- Closing a tab or session ends its shell, even with persistent sessions on, and deletes that pane's shell history.
Reopen a closed session
Closed sessions are kept on a stack of up to 100.
- Press
⇧⌘T(Reopen closed session). The palette opens on the last closed session with As it was closed selected. - Press
↩to rebuild it with its saved layout: its tabs and their launch commands, in fresh shells. Or pick another layout.
The sidebar's History section (folded by default; click its caption) lists the closed sessions of the selected label, newest first, each showing what its row showed when it closed. Click one to restore it the same way. An entry whose directory no longer exists is dropped from the list. A reopened session starts with no locked windows and new shell history.
What is saved
Flow saves every session, its layout, tabs, labels and pins to ~/Library/Application Support/flow/state.db as you work, and restores them on the next launch. Whether the shells themselves keep running between launches is the Persist sessions setting; see Persistent sessions.
To reuse a layout for new sessions, press ⇧⌘S (Save as workspace): name it and pick where to save it. It becomes a profile in the Layout step of New session. See .flowspace.json.
Sources
Written from these files in the Flow app repo
README.mdCLAUDE.mdsrc/workspace.rssrc/new_tab.rssrc/persist.rssrc/picker.rssrc/command.rssrc/infobar_ui.rssrc/tile_ui.rssrc/repo_config.rssrc/settings_catalog.rssrc/shell_history.rssrc/main.rssrc/pages.rs