            (last-mtime (nth 0 build-info))
            (last-recipe (nth 2 build-info)))
       (or (null build-info)
+          (member local-repo straight--live-modified-repos)
           ;; Rebuild if relevant parts of the recipe have changed.
           (cl-dolist (keyword straight--build-keywords nil)
             (unless (equal (plist-get recipe keyword)
                            (plist-get last-recipe keyword))
               (cl-return t)))
+          ;; Somebody deleted the build directory...
+          (not (file-exists-p (straight--build-dir package)))
           (progn
+            ;; Don't look at mtimes unless we're told to. Otherwise,
+            ;; rely on live modification checking/user attention.
+            (unless (eq straight-check-for-modifications 'at-startup)
+              (cl-return-from straight--package-might-be-modified-p))
             ;; This method should always be called from a transaction.
             ;; We'll get an error from `straight--transaction-exec' if
             ;; that's somehow not the case.

                 (eq (hash-table-test cache) #'equal)
                 ;; Eagerly checked packages should be a list of
                 ;; strings.
                 (listp packages)
                 (cl-every #'stringp packages))
          ;; If anything is wrong, abort and use the default values.
          (error "Malformed or outdated build cache"))
        ;; Otherwise, we can load from disk.
        (setq straight--build-cache cache)
        (setq straight--eagerly-checked-packages packages)))))

(defun straight--save-build-cache ()
  "Write data from memory into build-cache.el."
  (with-temp-file (straight--build-cache-file)
    ;; Prevent mangling of the form being printed in the case that
    ;; this function was called by an `eval-expression' invocation of

generated at the end of an init from the keys of
`straight--profile-cache'.")

(defvar straight--live-modified-repos nil
  "List of local repos that were identified by live modification checking.
All packages built from these local repositories need to be
rebuilt at the next init.")

(defvar straight--build-cache-version :jes
  "The current version of the build cache format.
When the format on disk changes, this value is changed, so that
