---
title: "Sessions and parallel work"
---

# Sessions and parallel work

How sessions, chats and worktrees relate in the Agents app, how to run several sessions at once, organise the sessions list, archive finished work, and compare models on one task.

A session is one piece of delegated work: a workspace (or none), an agent engine, a model, and one or more chats with that agent. You can run many sessions at once; each runs in the agent host, not in the window, so it keeps working while you look at another one.

## Sessions, chats and worktrees

- **Session**: the unit in the sessions list. It has a workspace (a folder or repository), an engine (the harness), and its changes.
- **Chat**: a thread of turns inside a session. Engines that support several chats let you add more to a session, for example a side chat or a fork at a turn; each chat has its own history.
- **Quick chat**: a session with no workspace, for a question that needs no files. Choose **New Quick Chat**.
- **Worktree**: with **New Worktree** chosen when you start a session, the agent works in its own git worktree on a new branch, so parallel sessions in one repository never edit the same files on disk. With **Branch**, the agent works in the existing repository on the branch you pick.

New worktrees are created beside the project by default (`<project>.worktrees`). The setting `sessions.worktreeLocation` chooses `besideProject`, `insideProject` (a `.worktrees` folder inside the project, excluded from git) or `custom`, with `sessions.worktreeCustomFolder` as an absolute folder.

## Run several sessions

1. Start a session and submit its task. See [Starting and reviewing a task](https://neuralinverse.com/docs/agents-app/tasks/).
2. While it works, choose **New Session** again. Each session appears in the list with its own chat and changes.
3. Select a session to see it. Drag sessions onto the session grid, or open several, to see them side by side.

Each session keeps its own tabs. The width of the side pane is the same for every session and survives a reload.

The sessions run in the agent host. On macOS, one agent host serves the Agents app and the Editor and keeps running when you quit the Agents app, so a session keeps working. On Windows and Linux, each app has its own host unless `NI_SHARED_AGENT_HOST=1` is set.

When several sessions in different repositories, or different teams, touch the same code, your organisation's team work registry can tell you. See [Team work](https://neuralinverse.com/docs/editor/team-work/).

## Organise the sessions list

The list groups sessions by workspace or by date. A session appears in exactly one section, in this order of precedence:

1. Archived (the last section)
2. Pinned
3. Your own groups
4. External sessions (when that section is turned on)
5. Quick chats
6. Workspace or date groups

- **Pin** a session from its context menu, or drag it to the pinned section.
- **Groups**: create groups and drag sessions into them. A session another session created is placed right after its creator and joins its group.
- **Sort** by created or updated time; drag to reorder.
- **Filter** by engine, environment, app that created the session, and archive state. The active session stays visible even when a filter would hide it.
- **Find** searches session and section names.
- **Nested sessions**: for engines with several chats, **New Nested Session** on a session row starts one under it.

Pins, groups, order, filters and collapsed sections are kept in your profile and are not sent to any provider.

## Finish and archive

When a session's work is done, choose **Archive** (or **Mark as Done**) on its row. Archiving removes it from its group. Undoing a bulk archive from the list restores the group membership.

- `sessions.autoArchiveOnPullRequestClose` archives a session once every pull request it opened is merged or closed. Each session can change this from its pull request bar.
- The Agents app suggests cleaning up session storage when inactive worktrees reach a count or size threshold; **Open Worktree Cleanup** shows them.
- The application badge (`sessions.showApplicationBadge`, with `sessions.applicationBadge` choosing what it counts) can count unarchived sessions that need input, have failing CI, or are unread.

A committed nested session can be deleted permanently only with **Delete Chat** in the chat tab's context menu. This cannot be undone.

## Compare models on one task (experimental)

With `sessions.chat.compareAgents.enabled` on (off by default), the new-session model picker offers **Compare Models**:

1. Under **Attempts**, choose two to ten different models, or one model and a **Number of Runs** from two to ten. Each attempt runs in its own worktree, with the same prompt, workspace, branch, engine and permissions.
2. Optionally choose a **Judge** model, which reviews every attempt's changes, checks validation claims, and recommends a winner.
3. Optionally choose a **Synthesizer** model, which can combine attempts after the Judge's verdict.
4. Choose **Done**, then **Run N Attempts**.

The repository must have at least one commit and a remote, and every engine must support worktrees. The comparison appears as one group in the sessions list; opening it shows every attempt in a grid. The Judge's verdict is advisory: **Focus Winning Session** opens the recommended attempt without applying anything to your working tree, and **Synthesize Attempts** starts a new session that never changes the original attempts.

Each attempt is an ordinary governed session: every action of every attempt is decided by your organisation's policy, and a locked or unavailable permission choice blocks the launch rather than choosing another.
