New session

Start an agent from a ticket or from a few lines of text, and choose where it works.

Last updated Nov 03, 2026

New session is where you start an agent on a piece of work. You write what the agent should do, or link a ticket, choose where it works, and press Enter. Tegment sets up the branch or worktree, opens a terminal and starts the agent with your prompt.

Opening New session#

New session opens over the panes and belongs to the project tab it was opened in. Close it with Esc or the close button, and your draft is still there when you come back. Each project keeps its own draft until you start the session or close the project tab.

What the agent should do#

Write the task in the text box, link a ticket, or both.

Paste images into the text box, or drop images and files on it, to send them along with the prompt. Files reach the agent as paths after your text.

Enter starts the session, and Shift+Enter adds a new line.

Where the agent works#

The Where the agent works chip picks one of four places:

PlaceWhat happens
New branchTegment creates a branch and a worktree for it, based on the branch you pick.
Existing branchTegment creates a worktree for a local or remote branch that doesn't have one yet.
WorktreeThe agent starts in a worktree you already have. Tegment says whether another agent already works there, since two agents in one folder can overwrite each other's changes.
Main folderThe agent starts in the repository's own folder, on the branch it has checked out.

A new branch from a ticket is named from the branch pattern in the project's GitHub or Jira settings. Without a ticket, the name comes from the first words of your text. You can edit it before you start.

A session with a ticket starts on a new branch unless you pick something else. Where a session without a ticket starts is a setting, Where a session without a ticket starts, under Settings → General: New branch (the default) or Main folder. A repository can choose differently on its New worktrees settings page.

The agent#

The Agent chip picks which agent runs, and for an agent that offers them, its model, effort and Auto-approve. Only agents Tegment finds on your machine are offered. See Supported agents for what each one supports.

Above the Start button, a line spells out what Start will do, for example which agent starts, in which worktree and from which base branch, and whether the post-creation commands run first.

After you start#

New session closes and the new terminal takes its place. The work is set up in the background, as when you start work from an issue, so you can carry on while the worktree is created and the post-creation commands run.

A session started from a ticket is named after the ticket. A session without one is named from the first line of your text, and the agent's own title can rename it later unless you have renamed it yourself.

For a Jira ticket, starting also moves the issue when the repository has auto-transition set up.