Jenkins hangs when pipeline completes successfullly

It’s now considered as a bad idea to run jobs on the built-in agent.
Please have a look at : Clarification about what can run on agents vs controller? - #2 by halkeye