code: def _run_command(self, packet):
          
          create_temp_cli = self.client_states is None
  
          if create_temp_cli:
              # If this client doesn't have a CLI. Create a Fake CLI where the
              # window containing this pane, is the active one. (The CLI instance
              # will be removed before the render function is called, so it doesn't
              # hurt too much and makes the code easier.)
              pane_id = int(packet['pane_id'])
              self._create_app()
              with set_app(self.client_state.app):
                  self.pymux.arrangement.set_active_window_from_pane_id(pane_id)
  
          with set_app(self.client_state.app):
              try:
                  self.pymux.handle_command(packet['data'])
              finally:
                  self._close_connection()
docs: Execute a run command from the client.