Return to Your Agent Session from the Graph: GitLens 19 Ties Claude Code to Each Worktree
If you run more than one coding agent at a time, you already know the failure mode. Three worktrees, three terminals, three sessions, and twenty minutes later you’re clicking tabs trying to figure out which one was doing the migration and which is waiting for you to answer a question. The work didn’t get lost: you just can’t find it.
GitLens 19, released on August 12 and announced on the GitKraken blog the next day, points right at that. The headline is a rebuilt Commit Graph, now first in the sidebar and presented as the single surface where you review, compose, compare, rebase and resolve conflicts. GitKraken says it plainly: “The Commit Graph is now the workbench for modern development workflows”.
The redesign is real, but it’s not the part that changes your day. The part that changes your day is a right-click on a working changes row: Resume Agent Session. You pick the agent session associated with that worktree and you’re back in, without having to go hunting for which terminal it was in.
This guide covers how to get it working, what the graph shows you while the agent works and — because GitKraken doesn’t put it in one place — which features are free, which need a paid plan and which are still labeled as Preview.
What You Need Before You Start
- GitLens 18 or later (agent session tracking arrived in 18; in 19 is where it integrates with the graph).
- One of the supported editors: VS Code, Cursor, Windsurf, Trae or Kiro.
- A GitKraken account. It’s free, but agent session features are marked as Preview, and Preview requires an account.
- Claude Code installed. This matters more than it sounds: look at the next section.
The Limitation Worth Understanding First
Live status monitoring within GitLens works only with Claude Code, through hooks that GitLens installs and manages on its own. That’s stated plainly, without ambiguity, in the GitKraken agents documentation.
The blog post is more loose: it says GitLens can dispatch work to supported IDE chats, to the Claude Code extension and to detected CLI agents. Both things can be true at the same time — dispatching work to an agent and observing its state in real time are distinct capabilities — but if you run Codex CLI, Gemini CLI or Cursor’s agent in parallel with Claude Code, don’t expect to see them light up on the graph. It won’t happen today.
So: this is a Claude Code workflow. If that’s your stack, it’s a good workflow.
Step 1 — Install Claude Code Hooks
GitLens offers installation in three places, and any one of them does exactly the same thing:
- the Commit Graph header
- the banner in the Agent Sessions view in the sidebar
- the Integrations menu
You accept and GitLens writes its hooks to Claude Code’s configuration. From that point on, the graph gets notified when a session starts, when it ends and when it’s waiting for something from you.
If you want to opt out, the Command Palette has an explicit exit: GitLens: Uninstall Claude Code Hooks. It’s worth knowing before you install rather than after — hooks that write to an agent’s configuration are exactly the kind of thing you want to be able to revert whenever you feel like it.
Step 2 — One Worktree per Task
All of this is built on worktrees, so if you’re still running agents within a single clone, this is the change that makes the rest work.
git worktree add ../myapp-auth-refactor -b auth-refactor
git worktree add ../myapp-billing-fix -b billing-fix
Two directories, two branches, one repository. Each agent gets its own working tree and stops trampling the uncommitted changes of the other.
GitLens 19 adds a quick-access bar that lists worktrees with uncommitted changes, so you can see at a glance which ones are dirty without opening each one. It also added a type-ahead reference finder: you press / within the graph and jump to a branch, a tag or a worktree by name.
Step 3 — Spin Up an Agent in the Worktree
Open the worktree in your editor and start Claude Code there the way you normally would. The hooks handle the registration; you don’t have to announce the session to GitLens.
The association that GitLens makes is between the session and the worktree it runs in. That’s the whole design: the worktree as a unit of parallel work, and the agent session as something that hangs off it.
Step 4 — Read the Graph While It Runs
The Commit Graph shows a work-in-progress row for each connected worktree — the uncommitted state as a first-class row, not as something you go hunting for. With the hooks installed, those rows carry the agent’s state in four values:
- Running — pulse animation, the agent is working
- Waiting for Input — a deliberately insistent animation; it’s the one that costs you time when you miss it
- Idle — connected, doing nothing
- Completed — finished, ready for you to review
“Waiting for Input” is the state that justifies the feature. With two or three sessions in parallel, what really eats your afternoon is an agent that asked a question forty minutes ago in a terminal you weren’t looking at.
Step 5 — Resume Agent Session
Right-click on the working changes row of a worktree. You get a list of agent sessions associated with that worktree: you reopen one that’s alive, or resume an earlier one.
That’s the whole feature, and it’s small on purpose. The graph you already have open becomes the index of where your agents are. You stop having to keep that index in your head.
What’s Free, What’s Pro and What’s Preview
GitKraken spreads this data in footnotes of the release notes, so here it is together.
Without tier restriction:
- the rebuilt Commit Graph and its new rendering engine
- stacked pull requests support and the new Pull Requests panel
- verification of commits signed with SSH
- model selection per function
- all navigation and visualization improvements
Requires GitLens Pro (trial or paid plan, for use on private repos):
- Automatic Rebase — the end-to-end mode where each conflicting step is resolved, staged and continued automatically, with a live Resolve panel that shows strategy, confidence and reasoning
- conflict detection in pull previews
Marked as Preview (requires GitKraken account):
- the agent session improvements, including everything this guide covers
- the repository query for conflict resolution with AI — where the model can read the file, blame or log the involved lines, search for other uses of the symbols and diff both sides before picking a resolution
Now read that list against the headline. The promise is a single surface where everything happens; in practice the surface is split across three tiers, and the flashiest piece — a rebase that handles itself to the end — is paid. The agent and worktree workflow, which is the reason to care about this release if you run Claude Code, is free with an account and labeled as Preview.
One setting worth knowing if you turn on repository querying: gitlens.ai.exclude.files applies to all reads the AI does, not just that function. If there are files you don’t want a model to open, that’s where you say so.
The Rest of 19.0, in Short
The graph rebuild is not cosmetic: GitKraken reports faster loading, rendering, updating, and scrolling in large repositories, reduced memory usage, and improved keyboard and screen reader accessibility. The specifics: column grouping, lane folding to collapse history you don’t care about, perceptually uniform lane colors for dark and high-contrast themes, colored reference pills by role for HEAD, upstream, and merge targets, a new Changes column with commit diffstats, sticky date grouping, and ? for the full keyboard reference.
Also in this release: stacked pull requests from GitHub understood as a unit, with layer badges and merge stack-aware merging via the GitHub API; commit composition moved from the custom editor to the graph details panel, with drag-and-drop reordering; model selection by function, so that composing commits, reviewing changes, and resolving conflicts use different models; support for Gemini 3.6 Flash and 3.5 Flash-Lite; locked worktrees with Unlock commands; Apply/Pop Stash on WIP rows; and a redesigned settings page with its own Agents section.
Is it worth installing today?
If you run Claude Code in parallel across worktrees, yes — and the setup is just installing a hook plus the worktrees you should already be creating. What you gain is not speed: it’s stopping the search. Which agent is on which branch, and which one is waiting for you.
If you run any other agent, install 19 for the graph rebuild and stacked PR support, and revisit monitoring later. None of this touches your Codex or Gemini sessions yet.
And if automatic rebase is what caught your attention, price it before planning around it. That’s Pro.
Do you already separate each agent into its own worktree, or are you still running everything in a single clone?