A session is a conversation between you and an agent. Each session tracks the full history of prompts you send and the responses the agent generates.
Every session runs in one of three modes, which determine the working directory the agent operates in. The mode is chosen when the session is created and cannot be changed afterwards.
| Mode | Working directory | Use for |
|---|---|---|
| Worktree (default) | A fresh git worktree on a dedicated branch | Feature work, experiments, anything you want isolated from your other sessions |
| Project Root | The project's root directory itself | Cross-branch operations like merging or rebasing session branches back into main |
| Scratch | An empty ephemeral directory under the session dir | Using the agent as a general assistant without exposing your project's sources |
You choose a mode from the New Session split button in the sidebar — see Creating a Session for the UI, and the sub-sections below for the semantics.

Each worktree session runs inside its own git worktree — an isolated copy of the project's repository. This means:
For more details on working with worktrees, including how to commit, rebase, and merge changes, see the Worktrees guide.
If the project's root path is not a git repository, worktree mode cannot be used and every new session runs in Project Root mode automatically — the agent runs in the project root directly and the session is badged with the orange ROOT pill.
Worktrees are the recommended way to work: they keep each session isolated on its own branch, let you review per-session diffs, and make the commit / merge / pull-request actions meaningful. When the project root is not a git repo, the sidebar adapts:
Once init completes, the banner disappears and the split button reverts to its normal worktree-first behaviour. If the init fails (for example the project root is inside another non-writable git repository), the error is shown in the banner and the UI stays in the non-git state so you can retry.
A project-root session runs the agent directly in the project's root path, with no worktree and no dedicated branch. It is designed for actions that need to see the real repository state, such as merging a session branch back into main.
Project-root sessions are marked with an orange ROOT pill in the sidebar and behave differently from worktree sessions:
git status / git diff before committing.A scratch session runs in an empty directory that has no git repository and no project source — the agent starts with an empty slate.
Scratch sessions are marked with a blue SCRATCH pill in the sidebar and are useful for:
Like project-root sessions, scratch sessions have no git repository, so the branch selector and branch-related sidebar actions are hidden.
When a scratch session is deleted, its directory is removed — nothing persists in the project.
If the worktree cannot be created or the agent fails to initialise (agent not running, timeout, etc.), the session's setup is aborted. Rather than disappearing silently, the session is kept in the sidebar at failed status so you can see what went wrong:
When an agent is upgraded or restarted, the agent's memory of your session may be gone. Braide handles this transparently so you can keep working without manually recreating the session.
When you send a prompt to a session whose agent has restarted:
When a session is recreated, a context compressed card appears in the event stream at the boundary between old and new history. It shows an amber indicator with the total number of rounds from the previous session and how much detail was retained for each round — full, compact, minimal, or omitted. Older rounds are the first to be compressed when the summary gets long.
Each session in the sidebar displays a status icon that reflects its current state:
| Status | Indicator | Description |
|---|---|---|
| Initializing | Rotating dashed arc | Server has created the session record but the worktree or agent handshake is still in progress. The sidebar subtitle ticks through "Preparing session…", "Creating workspace…", and "Connecting to agent…" — the same steps as the welcome splash |
| Not started | Hollow circle | Session is fully set up but no prompt has been sent yet |
| Running | Animated spinner | Agent is actively processing a prompt |
| Running with plan | Segmented donut chart | Agent is working through a plan — shows completed (green), in-progress (blue), and pending (grey) segments with a count (e.g. 2/5) |
| Paused | Orange pause icon | Session is waiting for user input (e.g. a permission request) |
| Completed | Green checkmark | Agent has finished and the session is idle |
| Error | Red X | Something went wrong mid-session — check the session for error details |
| Failed | Red X on a tinted disk | Session setup did not complete (worktree or agent handshake failed). The subtitle reads "Setup failed: {reason}" and the row stays in the sidebar until you delete or archive it |
| Archived | Archive box icon | Session is archived — worktree removed, history preserved. Opening the session shows the archived affordance with an Unarchive button. See Archive & Retention |
When a session is running with a plan, the donut chart animates with a rotating glow to indicate active work, and the segment proportions update in real time as tasks are completed.

While a session is running, you'll see a stream of events in the event history.
As the agent works, the session tracks cumulative cost and context window usage. This information is displayed in a status bar anchored to the bottom of the session view, above the prompt input, rather than inline in the event stream.
$0.2819).used / total (percentage) (e.g. 37,120 / 1,000,000 (3.7%)).When the agent is actively working, the cost info appears right-aligned on the same line as the "Working..." status indicator. When the agent is idle, the cost info remains visible on its own as long as usage data has been reported for the session.
On the same status bar, to the left of the cost and context figures, two optional pill buttons summarise the delegation activity that has happened in the session:
Each pill is hidden when its count is zero, so a session with no delegation shows only the running cost/context figures. The figures update live as new calls arrive.
Clicking a pill opens a popover anchored above the button with a grouped breakdown:
In both popovers, groups are sorted by call count (most-used first), then alphabetically. Press Escape or click outside the popover to dismiss it; click the originating pill again to toggle it closed.
A third pill — Files N — appears on the same status bar, to the right of the sub-agent and skill pills. It surfaces where the agent's Read / Write / Edit / MultiEdit / NotebookEdit tool calls have landed in the worktree, giving you three signals at a glance: hotspots, coverage, and the balance between reads and writes.
Clicking the pill opens an anchored popover whose bottom edge sits just above the pill. As you expand or collapse rows, the popover's top edge grows or shrinks while its bottom stays pinned — so the relationship between the popover and the pill remains stable. When there isn't enough room above (e.g. the session view is short), the popover flips below the pill instead.
The popover shows a condensed activity tree — only directories on the path to a touched file plus the touched files themselves.
3 reads, 2 writes. Reads are rendered in the accent colour; writes share a second, warmer hue. Every write-style operation shares the write colour — the UI does not distinguish between them.+N untouched files summary counts the direct siblings in that directory the agent has not touched. It's display-only in the compact view — it helps you see coverage without widening the popover.A maximise icon in the popover header opens the full File activity modal.
The modal opens on a larger canvas with a tab bar offering two complementary views of the same underlying activity data:
The selected tab is remembered so the modal reopens on whichever view you last used. A filename search input lives in the modal header and is shared across both tabs: typing filters the data each tab renders, and clearing the search restores the unfiltered view.
Press Escape or click outside the modal to dismiss it at any time. Clicking a file in either tab opens it in the file editor overlay and closes the modal.
The Tree tab renders the same condensed activity tree as the compact popover, with two modal-only affordances:
+N untouched files rows are clickable. Expanding one reveals the specific untouched siblings inline at low opacity, so you can see which files were skipped — useful for judging whether the agent missed something it should have considered.The Treemap tab lays out the directory containing the current drill-down point as a squarified treemap. Every rectangle is either a touched file or a directory whose descendants were touched — untouched files and directories that drop out of the current metric are excluded entirely.
Single-level rendering. The treemap shows only the immediate children of the drill-down point. Directories render as a single rectangle whose size reflects the aggregated activity of everything beneath them; clicking a directory drills into it, revealing its children as a fresh treemap. This keeps each level legible instead of recursively packing everything into one image.
Area metric. A segmented control above the treemap selects what drives rectangle size:
Switching metric preserves your drill-down position so you can compare the spatial shape of reads vs. writes within the same subtree.
Colour. Each rectangle uses a categorical base colour that identifies its kind, with a thin read/write strip along the bottom edge that encodes the activity balance. The encoding is the same in all three metric modes — switching metric only changes how the rectangles are sized.
Labels. Three visibility tiers by rectangle area keep the view readable as files get smaller:
N R · N W counts line.Drill-down. Navigate between levels with any of:
root / src / components / …) at the top of the tab to jump to that level.Drill-down is reset when you switch tabs or edit the search filter, and preserved when you toggle the area metric.
Keyboard. Every rectangle is focusable. Tab follows native DOM order; inside the treemap, arrow keys move focus spatially by centroid direction, Enter / Space drills into a directory or opens a file, and Backspace ascends one level. Escape still closes the modal.
Accessibility. Screen readers can announce the current drill-down, area metric, and the path and counts for each rectangle. Drill-down and metric changes announce through a polite live region.
Empty state. When the search filter rules out every touched file — or when a single-metric toggle leaves nothing with non-zero activity — the treemap shows a short "No files match the current filter." message instead of an empty canvas.
Some agents break their work into a structured plan — a list of tasks with progress tracking. When a plan is active, it appears as an anchored bar at the bottom of the session view.
Each plan item has a status icon:
The plan bar updates in real time as the agent works through tasks.
By default, the plan bar is collapsed. In this state it shows:
Click anywhere on the plan bar to expand it. The expanded view shows the full list of all plan items with their status icons, scrollable if the list is long. Click the bar again to collapse it back to the summary view. The toggle arrow rotates to indicate the current state.
The prompt input supports several features:
/ to see available commands with fuzzy matching autocomplete@ to autocomplete file paths for attaching contextYou can continue typing and submitting prompts while the agent is processing a previous one. Instead of blocking input, the prompt is added to a queue that is displayed as a row of removable chips above the input area.
When the agent completes its current task, all queued prompts are automatically sent together as a single prompt submission. Each queued prompt becomes a separate content block so the agent sees them as distinct instructions.
The queue, scheduling, and attachment state are all server-owned and reach the UI via SSE. See Prompt Queue & Attachments for the data model, event taxonomy, and optimistic-UI contract.
The left sidebar lists all sessions for the current project:
Status icon — Shows the current state of each session (see Session Status Indicators above)
Auto-labeling — Sessions are automatically labeled based on the first prompt text
Rename — Click a session name to rename it
Subtitle — Below each session label, a subtitle line shows the persona name (when the session was created with a persona) or the agent name (for sessions without a persona, or when the original persona has since been deleted), followed by the session creation date. The agent ID is used as a last resort if the agent is not currently known to the client. See Using Personas in Sessions for how personas are associated with sessions.
Mode pill — Sessions in a non-default mode display a coloured pill next to the agent/date line: orange ROOT for project-root, blue SCRATCH for scratch sessions
Active-terminal dot — A small green dot in the top-right corner of the status icon indicates that the session's embedded terminal is running on the server. The dot mirrors the same indicator on the terminal toggle button inside the session — useful for spotting long-running shells in other sessions at a glance. Hovering the dot shows a tooltip explaining what it means. The dot extinguishes the moment the shell process exits, whether you close it explicitly or it ends on its own.
Context menu — Click the kebab menu (three dots) on a session item to access actions:
For a failed session the menu is still available but the commit, merge, and pull-request entries are disabled — there's no agent connection or session branch to act on. Archive and Permanently Delete are the only meaningful actions and are how you remove the row from the list.
For details on configuring commit and merge actions, see the Actions guide.
Click the cancel button (visible while the agent is running) to stop the agent mid-response. The session remains open and you can send new prompts.
You can have multiple sessions open within a project. The sidebar lets you switch between them. Each session maintains its own independent conversation history and isolated worktree with its assigned agent.