Skip to content

Workspaces and Tabs

devxian edited this page Nov 30, 2026 · 12 revisions

English | 한국어

Workspaces and tabs

A workspace is one folder. Tabs belong to a workspace, and a new tab starts in that folder. This page shows how to work with workspaces, tabs, the split view and the sidebars.

Work with workspaces

Task How
Open Click New workspace in the sidebar or press ⌘N, then choose a folder
Switch Click one of its tabs, or press ⌥1…⌥0 (1st to 10th)
Collapse or expand Click the workspace name in the sidebar, or press ⌥⌘[ (current workspace)
Close Click the × next to the workspace name (always shown for the current workspace, on hover for the others), right-click → Close workspace, or press ⇧⌘W

You cannot close the last workspace; its × is dimmed and its tooltip says so. The × in the sidebar always asks first, and the question names the workspace, its number of tabs and how many of them run a program. If an editor tab has unsaved changes, cozzle then asks whether to save them.^app

Right-click a workspace name for New terminal tab, New browser tab, New Git graph tab, Copy path and Show in Finder (Explorer on Windows, the file manager on Linux). In a Git repository it also has the worktree items below.

Worktree per agent

To run several agents on one repository without them overwriting each other's files, give each its own git worktree. Right-click a repository workspace and choose New Worktree: Claude Code, New Worktree: Codex or New Worktree: Terminal. Type a branch name (an unused agent-N is filled in) and press Enter; Esc cancels. cozzle runs git worktree add -b <branch> into <repo>.worktrees/<branch> next to the repository, opens it as a workspace right under the repository, indented, and starts the agent in its first terminal. The workspace row shows the branch and the number of uncommitted changes.

Right-click a worktree workspace for:

Item What it does
Merge and Close Worktree Merges the branch into the branch checked out in the repository (git merge --no-edit), removes the worktree, deletes the branch with git branch -d and closes the workspace. Uncommitted changes in the worktree stop it. On conflicts it stops and opens the repository's Git graph tab to resolve them; the worktree stays.
Compare Side by Side Shown when the worktree came from Try with Several Agents…, or when you picked two or more worktrees with ⌘-click (Ctrl-click on Linux and Windows). See below.
Merge and Close Worktree Merges the branch into the branch checked out in the repository (git merge --no-edit), removes the worktree, deletes the branch with git branch -d and closes the workspace. Uncommitted changes in the worktree stop it. On conflicts it stops and opens the repository's Git graph tab to resolve them; the worktree stays.
Merge This and Close the Others Shown for a worktree from Try with Several Agents… that still has siblings. Merges it like Merge and Close Worktree, then closes the other worktrees of the same run like Close Worktree: their branches stay, and one with uncommitted changes asks first. Nothing is closed when the merge stops.
Close Worktree Removes the worktree and closes the workspace; the branch stays. With uncommitted changes it asks first and moves the folder to the Trash.

cozzle never forces anything here: no --force, -D or reset --hard. Agents use the same flow through cozzle worktree.[^worktree]

Several agents on one task

To let several agents try the same task and keep the best result:

  1. Right-click a repository workspace and choose Try with Several Agents…. A small form opens under the repository.
  2. Type the task, set how many Claude Code and Codex agents to start with − and + (up to 4 in total), and press Enter or Start. Esc cancels.
  3. cozzle creates one worktree per agent from the repository's current branch (agent-1, agent-2, …), opens each as a workspace under the repository and starts the agent there with the task as its first message. The agents follow your Run without permission prompts setting like an agent you start by typing claude or codex.
  4. Wait for the agents' notifications. A worktree row shows its branch and number of uncommitted changes.
  5. Right-click one of the worktrees and choose Compare Side by Side. The repository workspace shows one column per worktree: a Git graph tab of that worktree with the changes since the branch it started from selected (Compare with Working Tree), and under it a browser tab on the page that worktree's workspace shows, such as its dev server. Panes in the repository workspace are merged first; its own tabs stay in the first column.
  6. To take one file from another attempt, right-click it in a compare file list and choose Take This File. cozzle copies the file into the repository. It refuses when the repository has uncommitted changes to that file.
  7. Right-click the worktree you want and choose Merge This and Close the Others.

A repository can hold at most 8 worktrees from these runs at once; close finished ones to start more. Only sh, bash, zsh and fish are supported as the terminal shell for this, because the task reaches the agent through an environment variable (COZZLE_PROMPT), not as typed text.

[^worktree]: src/worktree.rs, src/worktree_view.rs

Tab types

Type How to open Description
Terminal ⌘T, new tab menu Terminal on the Ghostty engine. See Terminal
Browser ⇧⌘B, new tab menu The operating system's web view. See Browser
Git graph ⇧⌘H, new tab menu Commit graph and details. See Git graph
Editor Click a file in the Files panel, or cozzle open Edits one file. See File editor
Subagent view Click a row in a tab's subagent list in the sidebar Live, read-only transcript of a subagent in terminal style. A teammate in a tmux pane opens as a terminal tab attached to that pane. See AI agents

To open a new tab, click New tab in the sidebar or + on the right of the tab bar, and choose a type. Editor and subagent view tabs are not in this menu.

Tab icons follow the content. A browser tab shows the page favicon. A terminal tab shows an icon for the program in the foreground, such as claude, codex, vim, node, git, ssh or docker.

Work with tabs

Task How
Rename Double-click the tab, press F2, or right-click → Rename. Clear the name and press Enter to restore the default
Reorder Drag in the sidebar or the tab bar. Tabs move only within their workspace
Duplicate Command palette (⇧⌘P) → Duplicate Tab, or right-click → Duplicate. Opens a tab of the same type in the same working folder
Next or previous tab ⇧⌘]·⇧⌘[, or ⌃Tab·⌃⇧Tab
Go to tab N ⌘1…⌘9, ⌘0 (10th)
Close ⌘W, the tab's × button, or right-click → Close tab
  • The sidebar tab row shows × when you point at it, and always on the tab you are viewing. A tab with no running program (a shell waiting at its prompt) closes at once. If a program runs or an editor tab has unsaved changes, cozzle asks first, the same as ⌘W.
  • Agent tab rows also show the branch and the agent status. See AI agents.
  • A tab without a custom name shows its type. A browser tab shows the page title, and an editor tab shows the file name.
  • An editor tab with unsaved changes has ● before its name.
  • Editor tabs cannot be duplicated, because editing the same file in two tabs would overwrite one set of changes.

When the tab bar gets crowded, tabs share its width evenly and shrink:

  1. Narrower tabs cut their name short with ….
  2. Below about 72 px, a tab shows only its icon. The × appears in place of the icon on the tab you are viewing and on the tab under the pointer.
  3. When even icon-only tabs (36 px) do not fit, the tab bar scrolls sideways. Scroll with the mouse wheel or the trackpad. Switching tabs scrolls the tab you switch to into view. No tab is hidden or overlapped.

Dragging to reorder and the + button work the same in every case.^app

The tab context menu has:

  • Rename, Duplicate
  • Reload (browser tabs)
  • Copy working folder path, Show in Finder
  • Split right, Split down: moves the tab into a new pane beside or below its pane; when it is the only tab of its pane, opens a new terminal in the same folder there instead
  • Close split, while the view is split
  • Close tab, Close other tabs, Close tabs to the right

Split view

Split the center into panes to see several tabs of the same workspace at once. Each workspace keeps its own panes, and each pane has its own tab bar.^split

  • ⌘D opens a new terminal in a pane to the right of the active pane, ⇧⌘D below it (Ctrl+Shift+D and Ctrl+Alt+Shift+D outside macOS). The new terminal starts in the folder of the active terminal. Splitting the same way again adds an equal pane next to it instead of halving one pane.
  • Right-click a tab → Split right or Split down.
  • Drag a tab onto the page of a pane. Near an edge (within 30% of the pane) it splits toward that edge, in the middle it moves into that pane; the outline and a label (Split Left, Move to This Pane …) show where it will go. Dropping on a tab bar adds the tab to that pane.
  • ⌘\ (Ctrl+Shift+\ outside macOS) splits the next tab to the right, or, when the view is split, closes the split: all tabs go into one pane in reading order, with the active tab first. No tab is closed.

Drag a border between panes, either way, to resize the two panes next to it. Each pane keeps at least 10% of its row or column. The pointer becomes a resize cursor and the border turns blue on the handle. Double-click a border to make its two panes equal.

  • With two or more panes, the active pane's tab has a blue line on top. Shortcuts and closing a tab apply to that pane. Click a pane, or press ⌥⌘→ / ⌥⌘← to go to the next or previous pane in reading order (left to right, top to bottom).
  • ⌘1…⌘9, the next and previous tab shortcuts and the sidebar list tabs in the same reading order. Selecting a tab of another pane moves to that pane.
  • Closing a pane's last tab removes the pane; the pane before it becomes active.
  • Clicking a page in a browser pane makes that pane active and leaves typing in the page. Terminals and pages are not reloaded when their pane moves or resizes.
  • The panes come back with session restore.

Agents use cozzle tab split <id> or the --split option to show a result next to what you are looking at. They never change the pane you or the agent's terminal are in: the first time, the pane is cut once and keeps 60%; after that, the largest other pane is used. A pane is not cut below 440×280 points, and agents open at most 2 panes in a center narrower than 1600 points (3 from 1600, 4 from 2400 or 1800×1100). When nothing fits, the tab is only added to the tab bar. See cozzle CLI.

Sidebar width and visibility

Task How
Resize Drag the border between a sidebar and the center. Left: 180–600 px. Right: 280–600 px
Reset the width Double-click the border
Hide Drag it narrower than 120 px, click its hide button, or press ⌘B (left) or ⌥⌘B (right)
Show Click the show button in the tab bar, or press the same shortcut. Panel shortcuts such as ⇧⌘E also show a hidden right panel

The center always keeps at least 320 px.^app Widths and visibility are saved with the session.

Motion

Menus, the command palette and tooltips slide in briefly, and the sidebars shrink and grow when they hide and show. When you switch tabs, the center content fades in briefly. If the operating system's "reduce motion" setting is on, cozzle draws the end state at once without motion. cozzle reads this setting again each time its window comes to the front.^motion

Shortcut hints and the command palette

  • Hold ⌘ (Ctrl outside macOS) or ⌥ (Alt) for 3 seconds to show shortcut hints on buttons and tabs. Release the key to hide them.
  • Press ⇧⌘P to open the command palette. Find any action in the shortcut table by name and press Enter to run it. If you type several words separated by spaces, only items that contain all of them remain.

The full list is in Keyboard shortcuts.

Clone this wiki locally