You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the same Windows user creates a Zellij session from one login context (e.g., SSH) and lists sessions from a different login context (e.g., interactive desktop / RDP), list-sessions incorrectly treats the session as stale and deletes its marker file. The Zellij server process continues running but becomes invisible and unattachable from any context, effectively a zombie session.
Root cause
assert_socket in sessions.rs calls OpenProcess(PROCESS_QUERY_LIMITED_INFORMATION) to check if a session's server process is alive. On Windows, processes spawned in different logon sessions have different security tokens. OpenProcess can return ERROR_ACCESS_DENIED for a live process when the caller's logon session differs from the target's. The current code treats any OpenProcess failure as "process is dead" and deletes the marker file.
Minimal reproduction
Enable OpenSSH server on your Windows machine
SSH into your own machine: ssh youruser@localhost
In the SSH session, create and detach a Zellij session: zellij -s test-session (Ctrl+O, D to detach)
From SSH, verify the session is listed: zellij list-sessions → shows test-session
From the interactive desktop (e.g., Windows Terminal), list sessions: zellij list-sessions
Result: test-session does not appear. The marker file has been deleted.
From SSH, list sessions again: zellij list-sessions → session is gone
The server process is still running (tasklist | Select-String "zellij") but is now unreachable
How to fix
Imrove error handling on OpenProcess() and display "foreign" sessions as such. PR incoming
But still lists the session, so upon attaching to the session and then switching to RDP to list the session. Session magically appears back in the list but guess what attaching results in infinite hang.
Activity
laciferin2024 commentedon Mar 28, 2026
Additionally @divens
In SSH session,
Detaching : kills the session !
But still lists the session, so upon attaching to the session and then switching to RDP to list the session. Session magically appears back in the list but guess what attaching results in infinite hang.
divens commentedon Mar 30, 2026
@laciferin2024 I have not run into this issue. Can you give a step by step repro please?
laciferin2024 commentedon Mar 31, 2026
Sure ,
Try the same reproducer of yours , but stay in the session (wth ssh) and try list the session in RDP (its there) but u can't attach.