What frustrated me the most is that I didn't know that you can enter CTRL+B multiple times to control nested tmux sessions. Only learned that recently.
For example, CTRL+B CTRL+B d detaches the first nested tmux session, keeping the parent tmux session open.
I tried to avoid nested tmux sessions because I didn't know this but it still accidentally happened sometimes.
I run my bots like @hn in a tmux session on a server but I also open a tmux session by default on my computer. So I always had to make sure that I leave my local tmux session before I connect to my server and attach to the tmux session there.
But no more with this trick!
This feels like the advanced version of getting stuck in vim.
You know... I do something similar with a laptop to avoid having to get it out of the office. This is a great tip. I usually just open a new terminal though and ssh in, then attach to the tmux session. Great tip for sure.
CTRL+B CTRL+B d
detaches the first nested tmux session, keeping the parent tmux session open.