#8217·wezterm

macOS: GUI attached to unix-domain mux froze; relaunched GUI stays blank and accepts no input

Author: naoya675Created Sep 27, 2026Updated Sep 27, 2026
Labelsbugneeds:triage

What Operating System(s) are you seeing this problem on?

macOS

Which Wayland compositor or X11 Window manager(s) are you using?

No response

WezTerm version

wezterm 20240203-110809-5046fc22 (GUI and wezterm-mux-server are the same build)

Did you try the latest nightly build to see if the issue is better (or worse!) than your current version?

No, and I'll explain why below

Describe the bug

Environment: macOS 26.7 (25G229), Apple Silicon (Mac16,1)

I'm reporting this mainly in case it helps someone investigate. I don't know the cause.

What happened: It started while a GUI was already attached and working: right after I opened ~/.config/wezterm/keybind.lua (required from wezterm.lua) with vim in one pane, all windows stopped updating and accepting input. This was before I edited anything; I only opened the file. automatically_reload_config is enabled. I don't know whether opening the file was the direct cause or just a coincidence. I then killed vim from Terminal.app (killall vim). From then on, every newly launched GUI behaved as follows. Closing the pane where vim had run (23 -> 22 panes) did not change this.

A unix-domain mux was holding 22 panes across 3 windows. A newly launched GUI (connect unix) showed the tab bar but a blank terminal area and did not accept input. Relaunching the GUI several times did not help. Meanwhile wezterm cli --prefer-mux list/get-text/send-text kept working, and wezterm start (no mux) worked normally.

What made it work again: Without restarting the mux server, I raised the AF_UNIX socket buffers (both were 8192 before the change) and relaunched the GUI:

bash
sudo sysctl -w net.local.stream.sendspace=262144 net.local.stream.recvspace=262144

The GUI then rendered and worked immediately. I have not confirmed whether the buffer size is involved, and I can't explain the mechanism. The same setup had been working fine with 8192 before this.

Observations recorded while it was hung, in case they help:

  • WEZTERM_LOG=debug on the GUI: GetCodecVersion, SetClientId and ListPanes all get responses and all 22 panes are attached. The GUI then sends SetPalette (encode_async SetPalette, 15 of them for 22 panes: 14 x size=581 and 1 x size=579). After that there is no further encode_async or decoded serial for the rest of the log, even though KeyEvents are logged when typing.
  • wezterm cli list-clients showed the GUI with IDLE == CONNECTED time.
  • netstat -f unix -an on the GUI <-> mux socket pair:
    • mux-server side Recv-Q = 6389 bytes (= 10 x 581 + 1 x 579, which matches 11 SetPalette PDUs)
    • GUI side Recv-Q = 6719 bytes
    • By byte count, the mux-side buffer still appeared to have ~1.8 KB free.
  • sample of wezterm-mux-server: every thread idle for the whole 3 s (main thread in SimpleExecutor::tick -> flume recv, async-io thread in kqueue wait, per-pane threads in blocking read (read_from_pane_pty / parse_buffered_data), channel recv or Child::wait). No lock waits.
  • GUI CPU usage was 0%.

To Reproduce

I can't reproduce it reliably. It has happened twice. The first time, I killed the mux server along with the GUI and did not investigate. This report is about the second time, under these conditions:

  1. unix-domain mux, auto-spawned and running for about a week, with 22 panes across 3 windows
  2. net.local.stream.sendspace / recvspace at 8192
  3. while a GUI was attached, open ~/.config/wezterm/keybind.lua with vim in one pane -> all windows froze
  4. relaunch the GUI with connect unix -> blank window, no input

Configuration

Relevant parts of wezterm.lua:

lua
config.automatically_reload_config = true

-- ===== Multiplexing =====
config.unix_domains = { { name = "unix" } }
config.default_gui_startup_args = { "connect", "unix" }

-- ===== Keybinds =====
config.keys = require("keybind").keys

-- ===== Plugins =====
local sessions = wezterm.plugin.require("https://github.com/abidibo/wezterm-sessions")
sessions.apply_to_config(config, {
    save_state_dir = "default-user-owned",  -- ~/.local/share/wezterm-sessions/state/
})

keybind.lua only defines a few key bindings (SendString, ShowLauncherArgs, QuickSelect, MoveTabRelative). Omitted: font/window/IME settings and a launch_menu.

Expected Behavior

The GUI keeps working, and a relaunched GUI attaches and renders the existing panes.

Logs

No full logs kept: I troubleshot step by step with an AI assistant (Claude) and only looked at excerpts. The mux server's own log had a single line, from before the problem started: ERROR termwiz::escape::parser > impossible C0/C1 control code '\\\u{81}' 0x81 was dropped

Anything else?

Why I did not try nightly: I can't reproduce the problem, so I have no way to check whether nightly behaves differently.

How the mux server runs:

  • wezterm-mux-server was started automatically by wezterm (no launchd agent; I did not start it manually).
  • GUI and mux server come from the same app bundle (/Applications/WezTerm.app; the Homebrew wezterm binaries are symlinks into it).
  • wezterm-sessions (abidibo/wezterm-sessions @ d801ca8) only adds key bindings and event handlers. Its periodic autosave is off until toggled by a key, so it is off in a freshly started GUI, and it registers no gui-startup / mux-startup / gui-attached hooks.

Possibly related: #7692 (same version, mux alive but not answering).