tmux 3.3 and macOS command line editing issue

micheal@~ % clear
terminals database is inaccessible
micheal@~ % echo $TERM

The tl;dr is that the first release of tmux 3.3 on Homebrew had a bad default-terminal set for using it with macOS. This has been fixed by setting the following in .tmux.conf:

set-option -g default-terminal screen-256color