flwr run . local silently reuses a local SuperLink started from another project, so the ServerApp runs with the old working directory and venv

flwr run . with the default local SuperLink starts a background flower-superlink the first time and reuses it on later runs. If that SuperLink was started from a different project, later runs from a new project still go to the old one. As a result:

  • The ServerApp’s working directory is the old project’s folder, so anything saved with a relative path or Path.cwd() (e.g. the outputs/ folder in the quickstart-pytorch example) goes to the old project.
  • The SuperLink and SuperExec processes use the old project’s virtualenv (/old-project/.venv/bin/python), so the run may use different installed packages.

Nothing warns you about this, so outputs seem to disappear.

Steps to reproduce

First make sure that superLink is not running:

  1. In project A, with its own venv active, run flwr run .. The local SuperLink starts in the background.
  2. Copy the app into project B, create a separate venv, and run flwr run . from project B.
  3. Outputs written with Path.cwd() in the ServerApp go to project A’s folder. ps//proc/<pid>/cwd shows flower-superlink still running from project A’s folder with project A’s venv.

Environment

  • flwr: 1.39.0
  • Python: 3.14.4
  • OS: Linux (WSL2), kernel 6.18.40.1-microsoft-standard-WSL2
  • SuperLink: default local (address = ":local:" in ~/.flwr/config.toml), started with --simulation --isolation subprocess

Workaround
Kill the stale processes (pkill -f flower-superlink; pkill -f flower-superexec) and run flwr run . again from the new project.