Skip to content
flow

WorkspaceSessions, tiles and tabs

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.

View as Markdown
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

  1. Press ⇧⌘N, click New session under the Sessions caption, or run New session… from the command palette.
  2. Repository: pick the directory. The list shows Favorites, then Recents (the last 8), then All: your home folder ~, ~/src and 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.
  3. 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.
  4. Layout (only when the directory has workspace profiles in .flowspace.json): "Default — single pane" or a saved profile. See .flowspace.json.
  5. Label: No label, an existing label, or "New label…" (named from what you type). See Labels and spaces.
  6. 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:

  1. 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).
  2. Type a path: ~ and ~/…, a path relative to the current directory, and . / .. all work. The directory must exist.
  3. 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

ToDo
Open a tab in the focused tile⌘T, or the "+" at the end of the tab strip
Always open a terminalRight-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 tabDrag 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 typeIt opens
NothingA terminal
A URL (https://…, localhost:3000, example.com)A web tab (web tabs experiment on)
#123That pull request
A path with no spaces (/…, ~/…, ./…)A Files tab (an executable or missing path runs as a command instead)
Anything elseA 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

KindWhat it is
TerminalA shell or program on a terminal
WebA web page (Web tabs)
Pull request reviewA PR's summary and changes (Pull requests)
FilesA read-only browser of the session's directory (Files)
NotesThe session's notebook of Markdown pages (Notebooks)
ShellsThe shells an agent ran in this session (Persistent sessions)
DetailsAn agent's context card expanded into a page
New tabThe launcher above, which turns into one of the others

Splits and focus

ToDo
Split the focused tile side by side / stacked⌘D / ⇧⌘D
ResizeDrag 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.
  • ⌘1 to ⌘9 jump 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:

ItemDoes
Mark as unreadPuts the unread dot back on the primary pane
Pin group / Unpin groupMoves the session into or out of the Pinned section. Pinned and snoozed exclude each other.
SnoozeParks the session until a condition (Notifications and snooze)
BabysitHas the Flow agent watch the session (Flow agent)
Session group itemsNew group with this session, Add to / Move to group, Remove from group (Session groups)
Close sessionCloses it after a confirm
LabelsOne checkable row per label

Close tabs and sessions

  • ⌘W closes the active tab. A pinned tab does not close. Closing a tile's last tab closes the tile.
  • ⌘W on 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.

  1. Press ⇧⌘T (Reopen closed session). The palette opens on the last closed session with As it was closed selected.
  2. 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.md
  • CLAUDE.md
  • src/workspace.rs
  • src/new_tab.rs
  • src/persist.rs
  • src/picker.rs
  • src/command.rs
  • src/infobar_ui.rs
  • src/tile_ui.rs
  • src/repo_config.rs
  • src/settings_catalog.rs
  • src/shell_history.rs
  • src/main.rs
  • src/pages.rs