Please show me where. It only works for tabs that have a running process.

oh, you might be doing it via the UI, I turn off all the UI elements and hotkey everything, if you use hotkeys you can add a thing like :- action = wezterm.action.CloseCurrentTab { confirm = true },