The OSC 11 query opted out under tmux on the assumption it would need the
\ePtmux; passthrough wrapper. It does not, and that assumption cost the
fix precisely where it was wanted: ssh'd into a box inside tmux.
tmux answers OSC 11 from a pane itself, out of the background it queried
from the outer terminal, and it re-queries when that terminal reports a
colour scheme change -- so the value tracks the real window rather than
going stale at tmux start. Measured on tmux 3.7b, the version on both
ends: a pane's query is answered without ever reaching the outer
terminal, and after a colour scheme notification the next query returns
the new background. No tmux configuration is required.
Passthrough is the wrong tool here and stays unused: it is output-only,
so the outer terminal's reply goes to tmux rather than to the pane, and
a wrapped query returns nothing at all.
screen keeps opting out -- untested rather than known broken, and there
the caller falls back to the config files as before.
The live pty suite gains a remote-tmux scenario: config files all dark,
terminal reporting light, the whole thing inside tmux. It fails with the
opt-out restored.