It can be done in the :window-created hook:

(:add-hook (in jwno/context :hook-manager) :window-created
   (fn [win _uia _exe _desktop]
     (when (is-my-special-window? win)
       (def frame (get-my-special-frame))
       (put (in win :tags) :frame frame))))