Repository navigation
Description
What is the problem?
While a review is open in iTerm2, the tab hosting it stops identifying its session, and the OS window title empties out with it. Both come back when the overlay closes.
Both surfaces read the active session's name, and the overlay pane is created without one of its own. split … with same profile copies the parent session's profile — including the session-scoped name override iTerm2 stores a session name as — but not the parent's session variables. So where the parent's name interpolates variables (\(user.…), the only way to keep a label current on a profile that disables title-setting OSCs), the copy has nothing to interpolate.
Measured on iTerm2 3.6.11, with the parent's name set to <b>\(user.probe_var)</b> and probe_var published in the parent:
parent name=[<b>PARENT</b>] var=[PARENT]
overlay name=[<b></b>] profileName=[<b>\(user.probe_var)</b>] var=[missing value]
overlay open, not yet focused tabTitle=[<b>PARENT</b>] windowTitle=[PARENT]
overlay focused tabTitle=[<b></b>] windowTitle=[]
Where the parent's name is a static string, the pane inherits that string instead, and the tab spends the review claiming to show something it isn't.
iTerm2 is the only backend whose overlay goes unlabelled. OVERLAY_TITLE (rd: <dir> [ref], launch-revdiff.sh:116) is applied for tmux (-T), zellij (--name), herdr (--label), kitty (--title), and the emacs frame name. The iTerm2 branch never applies it to the session it creates, and nothing in revdiff --help sets it either.
How does this solve it?
Name the session the split returns, using the title the launcher already computed:
set newSession to split horizontally with same profile command cmd
set name of newSession to overlayTitleThat addresses the cause — a pane with no name of its own — rather than the symptom, and puts iTerm2 on the footing the other backends already have: the tab reads rd: revdiff [HEAD~1] for the duration of the review and reverts on its own when the pane closes, since the name belongs to the session.
There is no tab-level alternative to fall back on: tab exposes a title property in iTerm2's scripting dictionary, but setting it fails with AppleEvent handler failed.
What would need to change
| File | Change |
|---|---|
.claude-plugin/skills/revdiff/scripts/launch-revdiff.sh |
iTerm2 branch: pass $OVERLAY_TITLE as one more argv item into the split osascript, and set the name on the session it returns |
plugins/codex/skills/revdiff/scripts/launch-revdiff.sh |
the same branch, duplicated |
plugins/revdiff-planning/scripts/launch-plan-review.sh |
the same branch; its OVERLAY_TITLE is plan: <file> |
app/testdata/plugin-exit-code/fake-overlay-backend.sh |
its osascript arm dispatches on argument count plus -x "$3", so appending the title after the existing items keeps the stub matching; inserting it earlier shifts the launch-script position and breaks it |
app/plugin_exit_code_test.go |
the iterm2 launcher case already runs against that stub, so an args-capture assertion in the FAKE_AGTERM_ARGS_FILE style would pin the name down |
plugins/opencode/tools/revdiff.ts |
nothing — it shells out to the same launch-revdiff.sh |
Seen on iTerm2 3.6.11 / macOS 26.5.2, with revdiff at 3a01589.
Activity
umputun commentedon Aug 5, 2026
reproduced the cause, but not the symptoms you describe. Measured on iTerm2 3.6.10beta1, same probe setup as yours (parent name
<b>\(user.probe_var)</b>,probe_varpublished in the parent only).<default>below is the profile's default title, unchanged from stock:so the diagnosis holds. The split copies the profile including the name template, the session variables don't come with it, and the new session has no name of its own.
focus is what triggers the visible change:
your fix works and reverts on close as you predicted, and
set title of tfails withAppleEvent handler failedhere too, so the tab-level route is out.four things don't match:
the window title never moved. It read the same string at every step including while the overlay was focused, and it was never the session name to begin with. Nothing empties. That part looks specific to your window title components.
nothing blanks. The overlay name falls back to the default title, not to
<b></b>. The tab shows the wrong label for the duration of the review, it doesn't go empty. The issue title says otherwise.static parent names are not inherited. Renamed the parent to
MY-WORK, split, focused the overlay: both the session name and the tab fell back to the default title. It inherits nothing in either case. So "the pane inherits that string instead" is wrong.iTerm2 is not the only unlabelled backend. wezterm (
launch-revdiff.sh:382), cmux (410), ghostty (454) and agterm (147) don't applyOVERLAY_TITLEeither.also worth being clear on the reach: on a default profile there is no symptom at all, parent and overlay render the same title and the tab doesn't change. This only shows up for people who name their sessions.
the underlying gap is real though, the pane should carry
OVERLAY_TITLElike the other backends do, and #309 is the right shape for it. I get the same result from that change here, the tab picks up the title and drops it again when the pane closes. Left two notes on the PR.