Environment variable set to the number of available CPU's

I independently went through precisely the same thought process as the OP and am also unaware of a way to correctly introspect the number of available vCPUs, so I just wanted to second this feature request. I will add that the issue extends beyond languages to any tooling that introspects /proc (e.g., jest or, I suspect, msbuild -maxCpuCount). Furthermore, the symptoms resulting from this issue could vary from slow build times, to out-of-memory errors, to flaky builds, to exposing race conditions in buggy tools (which I suppose is a good thing), making it often rather opaque and troublesome to debug for those who aren’t already aware of it.