Persist tab groups across tmux detach/reattach

Feature Request

Summary

Tab groups (new in 3.7) don't survive a tmux integration detach/reattach cycle.

I use `tmux -CC attach` to open tmux windows as native tabs. Group them into named, colored groups, detach, and then reattach: the tabs all come back, with "per-tab" settings such as tab title, tab color etc preserved, but the Groups that I created are lost.

iterm2 version: 3.7.2

OS: MacOS Tahoe Version 26.6.2

1. tmux -u -CC attach -t mysession (windows open as native tabs)

2. Group some tabs into a named, colored group

3. Detach, then reattach with the same command

Alternatives

  • Potentially use the new python API + scripts to save group names/colors and tab_title -> group mappings in some local file and reapply them every time we reattach tmux. However I have not explored this and script may need to periodically poll the tab group state to know when to write to the file. Ideally, tab group state should restore automatically like all other window state with tmux.
  • Same "grouping" functionality can be achieved using separate iterm2 windows, but not with the Tab groups functionality new in 3.7
  • Manually redo the groups every time I reattach my session - very cumbersome.

Concerns

No implementation concerns that I am aware of.

The new Tab Grouping feature is extremely convenient but loses most of its value with a tmux integrated workflow - which is the primary way I use iterm2.