On macOS the first GUI frame of an Emacs daemon turns the menu bar back on in terminal frames
Symptom#
An Emacs daemon started with (menu-bar-mode -1) shows a menu bar line at the top of its terminal frames (emacsclient -t) after a GUI frame has been opened once. A plain GUI Emacs never shows this.
Cause#
When a daemon opens its first GUI frame, Emacs's macOS window-system setup runs then, after the init files, and it enables the menu bar for every frame, terminal frames included. In a non-daemon GUI Emacs that setup runs before the config, so the config's setting wins.
Fix#
Turn the menu bar off again right after the first GUI frame is set up, for example from after-make-frame-functions when the new frame is a GUI frame: call (menu-bar-mode -1) and set menu-bar-lines to 0 on the existing terminal frames. The macOS menu at the top of the screen is not affected.
Evidence#
Emacs 30 daemon on macOS, 2026-09-26: on a test daemon, a terminal frame was opened, then the first GUI frame. Before the fix the terminal frame's top line became a menu bar; after it, the line stayed empty.