Skip to content

zmx attach hangs silently when session daemon is from an older version (0.6.0 daemon + 0.7.0 client) #211

Description

@silvansky

Summary

After upgrading zmx 0.6.0 → 0.7.0 (Homebrew tap), zmx attach to any session whose host daemon is still running 0.6.0 hangs indefinitely: the client connects but renders nothing, never replays scrollback, and never returns. There is no error message. Sessions created after the upgrade (0.7.0 host) attach fine.

Environment

  • macOS Darwin 25.2.0, Apple Silicon
  • zmx 0.7.0 via neurosnap/tap (upgraded from 0.6.0)
  • Terminal: Ghostty 1.3.2-dev

Steps to reproduce

  1. Install zmx 0.6.0 and create a session: zmx attach mysession, detach, leave the host daemon running.
  2. Upgrade to 0.7.0 (brew upgrade zmx).
  3. Run zmx attach mysession with the new binary.

Observed

  • zmx attach mysession hangs forever with a blank screen. The log shows the connection succeeding and then nothing:

    [info] (default): socket path=$TMPDIR/zmx-501/mysession
    [info] (default): ensure session session=mysession
    [info] (default): attached session=mysession
    [info] (default): client loop fd=4
    
  • Other commands against the old daemon behave inconsistently:

    • zmx list — works (though one 0.6.0 session's entry is printed malformed, missing its name=/pid= fields)
    • zmx history mysession — works
    • zmx get mysession — fails fast with a clear error: error: session "mysession" does not support labels (daemon too old?)
  • Clients that were already attached before the upgrade keep working.

Expected

Attach should detect the daemon/protocol version mismatch and fail fast with an actionable error (like zmx get already does), e.g. error: session "mysession" was created by an older zmx; restart it to attach. Silent hang makes it look like the session itself is wedged.

Workaround

Kill the old host process (plain kill <host pid>) and recreate the session with the new binary. zmx history still works against the old daemon, so scrollback can be salvaged first.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions