title: tmux fails with 'server exited unexpectedly ' upon send-keys
body: <p>I am fresh new to tmux.  After going through Hogan's tutorial, I created a tmux script file for my environment.  when I run this script, it fails on the send-key function.  My script is as below.</p>
  
  <pre><code>set -x
  # Creates a session with a name 'todos'
  tmux new-session -s todos -n backend -d
  
  # cd to the project directory and open vim editor
  tmux send-keys -t todos 'cd ~/projects/explore/mongo-app/' C-m
  tmux send-keys -t todos 'nvim' C-m
  
  set +x
  </code></pre>
  
  <p>When I debug the script, it shows that it failed at send-keys function, as below.</p>
  
  <pre><code>++ tmux new-session -s todos -n backend -d
  ++ tmux send-keys -t todos 'cd ~/projects/explore/mongo-app/' C-m
  server exited unexpectedly
  ++ tmux send-keys -t todos nvim C-m
  </code></pre>
  
  <p>I am using tmux 3.0a on Ubuntu 20.04.  How do I fix this issue?</p>