Sessions

  • Tier: Premium, Ultimate
  • Offering: GitLab.com, GitLab Self-Managed, GitLab Dedicated

Sessions show the status and execution data for the agents and flows you’ve run.

GitLab creates a session each time GitLab Duo Agentic Chat, a flow, or an external agent runs. Examples include:

  • Flows that run on a runner or that an automation starts, like the Fix CI/CD Pipeline Flow. These sessions are visible in the UI under AI > Sessions.
  • Flows that run in the IDE, like the Software Development Flow. These sessions are visible in the IDE, on the Flows tab, under Sessions. In VS Code and JetBrains IDEs, the Flows tab is available only in the classic layout.
  • Sessions created by GitLab Duo Chat. These sessions are visible on the right sidebar by selecting GitLab Duo Chat history.

View sessions for your project

Prerequisites:

  • The Developer, Maintainer, or Owner role for the project.

To view sessions for your project:

  1. In the top bar, select Search or go to and find your project.
  2. In the left sidebar, select AI > Sessions.
  3. Select any session to view more details.

View sessions you’ve triggered

To view sessions you’ve triggered:

  1. In the right sidebar, select GitLab Duo sessions.
  2. Select any session to view more details.
  3. Optional. Filter the details to show all logs or a concise subset only.

Triage sessions in the session inbox

The session list in the right sidebar has two tabs: Needs a decision and All. Needs a decision shows sessions that wait for you to approve or respond to an agent action. All shows every session you’ve triggered.

GitLab Duo Agentic Chat sessions

Because chats are interactive, they require a clearer separation in the UI. You can think of the Chat history as a filtered view of sessions that exists exclusively for Chats.

To browse and switch Chat sessions in the GitLab Duo CLI, see switch sessions.

Cancel a running session

You can cancel a session that is running or waiting for input. To cancel a session:

  1. In the top bar, select Search or go to and find your project.
  2. In the left sidebar, select AI > Sessions.
  3. Select the session.
  4. In the upper-right corner, select Cancel session.
  5. In the confirmation dialog, select Cancel session to confirm.

After cancellation:

  • The session status changes to Canceled.
  • The session cannot be resumed. To run it again, retry the session.

Retry a failed or canceled session

  • Status: Beta

The availability of this feature is controlled by a feature flag. For more information, see the history.

Retry a failed or canceled session to run the flow again with the same prompt.

Prerequisites:

  • You must have the Developer, Maintainer, or Owner role for the project.
  • You must be the user who started the session.
  • The session must belong to a project.

To retry a session:

  1. In the top bar, select Search or go to and find your project.
  2. In the left sidebar, select AI > Sessions.
  3. Select a session with the Failed or Canceled status.
  4. In the upper-right corner, select Retry session.

You can also retry a session from the Sessions list on a work item, merge request, or pipeline.

After you retry a session:

  • A new session starts with the same flow and prompt.
  • If you retried from the session page, the new session opens.
  • The original session keeps its status.
  • In the Sessions list on a work item, merge request, or pipeline, the original session shows View retry, which links to the new session.

Agent attribution on comments and work items

  • Offering: GitLab.com, GitLab Self-Managed
  • Status: Beta

The availability of this feature is controlled by a feature flag. For more information, see the history.

When a session creates a work item or posts a comment, GitLab shows which agent ran the session and who it ran for.

  • On a work item, a line next to the creation details names the agent and the user. For example, Session by <agent_name> on behalf of @<username>.
  • On a comment, the agent is the comment author. The comment header shows Session on behalf of @<username>. Comment headers show this text on issues, epics, other work items, and merge requests.

When a schedule, another session, a verification check, or GitLab triggered the session, the text names the trigger instead of a user. For example, Session by <agent_name> triggered by a schedule.

Anyone who can view the work item or comment can see this text.

When the feature flag is on, a work item that a session creates on behalf of a user lists that user as its author. When the flag is off, work items that a session creates through the REST API list the agent’s service account as the author. Turning off the flag doesn’t change the author of existing work items.

Review and control agent actions

  • Offering: GitLab.com, GitLab Self-Managed, GitLab Dedicated

Prerequisites:

When a flow reaches a human interaction checkpoint, execution pauses and the session waits for your input.

Approval notifications

When a flow pauses at a checkpoint, GitLab notifies you in two ways:

  • To-Do item: A to-do item labeled Duo Workflow approval required is added to Your work > To-Do List. The item links directly to the session where you can take action. GitLab marks the to-do item as done automatically when you approve, reject, or modify the request, or when the workflow is canceled or stopped.
  • Email: An email notification is sent with the workflow name, the project it belongs to, a summary of completed actions and the pending request, and a direct link to the approval UI.

Respond to an agent checkpoint

To review and respond to an agent checkpoint:

  1. On the GitLab Duo sidebar, select Sessions.
  2. Select the session that is waiting for your review.
  3. Review the agent’s completed actions and its proposed next steps.
  4. Select one of the following:
    • Approve: Allow the agent to continue with its planned actions.
    • Reject: Stop the flow execution immediately.
    • Modify: Send feedback or a suggestion to the agent. The agent returns to the checkpoint for another review.

Session retention

Sessions are automatically deleted 30 days after the last activity. The retention period resets each time you interact with the session. For example, if you interact with a session every 20 days, it will never be automatically deleted.

In the IDE, you can also manually delete sessions before the 30-day retention period expires.