I found out this can work:
julia> addprocs(1, exeflags=["--threads=4", "--project=$(Base.active_project())"])
It’s maybe not strictly a bug, or then a doc bug, I would still file an issue.
What I wrote before figuring out the above (and you may want this to work, or the docs explicit this will not work):
The s in exeflags implies to me more than one allowed, and I tried switching around:
julia> addprocs(1, exeflags="--threads=4 --project=$(Base.active_project())")
ERROR: julia: -t,--threads=<n> must be an integer >= 1
ERROR: TaskFailedException
nested task error: Unable to read host:port string from worker. Launch command exited with error?
[stacktrace skipped]
It seems nonsensical, as in the parser trying to split up -t and the --project part not working. I guess in your case -t was just ignored. Is there a different way to invoke this?