NPE in Intellij gradle refresh, but not in command line gradle build

Not expecting an answer, but hoping for some direction on where to go next…

Recently published some updates to our in-house gradle plugins. Our build works fine, the output is as expected, tests all passing. However, when loading the project in Intellij, the gradle project refresh will work once, then fail with an exception on follow-up attempts. However, changing our gradle wrapper version (from 3.4.1 to 3.5 and vice-versa) will allow the refresh to work once, before again failing. Change the version again, same thing – works once, then fails. Have tried altering memory settings, disabling daemon, deleting .gradle cache, etc…

Have also cleared caches in the IDE to no avail.

Looking for suggestions/pointers on how I should start troubleshooting this issue, I am not too familiar with the tooling api at all.

Here is a gist of the relevant log from the intellij:

Also as a related question – should we be using the idea plugin? We don’t commmit ide-specific files as our team uses multiple different IDEs, and we’ve not seemed to need gradles idea plugin since early experiments years ago. Thus far, everything has worked fine.