Real tmux assigns $N IDs sequentially at session creation time and resolves them server-side. libtmux uses these IDs internally (e.g. after new-session returns $0 in the session ID field).
When libtmux calls attach-session -t $0, psmux treats $0 as a literal session name rather than a tmux session ID. This produces either ns__$0 (with -L namespace) or $0 (without) and neither matches any real session.
Reproduction
# Start a psmux session
tmux new-session -d -s mysession
# This works (literal name):
tmux attach-session -t mysession
# This fails (session ID — what libtmux uses):
tmux attach-session -t '$0'
# Error: no session found
Related to #318.
Real tmux assigns
$NIDs sequentially at session creation time and resolves them server-side. libtmux uses these IDs internally (e.g. afternew-sessionreturns$0in the session ID field).When libtmux calls
attach-session -t $0, psmux treats$0as a literal session name rather than a tmux session ID. This produces eitherns__$0(with-Lnamespace) or$0(without) and neither matches any real session.Reproduction
Related to #318.