A big task with gradle (which uses daemons by default) seems to make codespaces non responsive.
Clone this repo
Run build like
./gradlew nativeImage which probably downloads 1GB of data, and the build takes 2 minutes and uses multiple GB of RAM if available. Native image probably also has a daemon.
But ideally the container would stay safe e.g. fail the build processes before becoming unresponsive itself, assuming that is the problem.