Skip to content

docs: document resurrect restore workaround for unix domain mux mode#138

Open
fireboy1919 wants to merge 3 commits into
MLFlexer:mainfrom
fireboy1919:docs/unix-mux-restore
Open

docs: document resurrect restore workaround for unix domain mux mode#138
fireboy1919 wants to merge 3 commits into
MLFlexer:mainfrom
fireboy1919:docs/unix-mux-restore

Conversation

@fireboy1919
Copy link
Copy Markdown

@fireboy1919 fireboy1919 commented Mar 12, 2026

Summary

docs: document resurrect restore workaround for unix domain mux mode

gui-startup is never emitted when default_gui_startup_args = { "connect", "unix" } even if mux just started,
so resurrect_on_gui_startup silently does nothing in that setup.

Documents the workaround with a complete configuration snippet that users
can copy directly into their wezterm.lua.

Rusty Phillips added 3 commits March 12, 2026 10:58
gui-startup is never emitted when default_gui_startup_args = { 'connect', 'unix' },
so resurrect_on_gui_startup silently does nothing in that setup.

Documents the workaround: the mux server writes a timestamped marker file
on first config load (detected via wezterm.GLOBAL + wezterm.gui == nil),
and the GUI reads and deletes it in update-status for a one-shot restore.
The 30-second timestamp guard prevents stale markers from triggering spurious
restores after a crash.
The previous snippet set _startup_restore_done = true immediately when no
marker was found, which races with the mux server writing the file. The
GUI's first update-status tick often fires before the mux server process
has finished its first config load, so the marker hadn't been written yet.

Retry for up to 15 seconds before concluding this is a reconnect rather
than a cold start. Also add resize_window = false to the restore call to
prevent the workspace restore from resizing the window.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant