Internal inconsistency error (didStartTask)

I just got this error today in our GitHub action CI build. XCode 15.0.

Having this issue too with internal prebuildCommand's but not so many issues with buildCommands where inputs and outputs are known…

Especially issues with build commands that generate resources.

We hit this issue 5-20 times per day, per engineer so it's got a decently significant impact on our workflow. Fortunately, closing and reopening Xcode works some of the time but I'd estimate 30-60 minutes of wasted time per day, per engineer if you factor in context switching and clean/re-build times.

I know this is already on the radar of Xcode folks, but I'm wondering if there's any tips on where this is coming from / how we could change our setup to avoid this while it's being fixed?

Some details that may be relevant:

  1. We use 2 plugins - 1 compiler for some custom macros (all quite simple, mostly for fun) and the Swift OpenAPI generator.
  2. We also have ~70 packages, each with their own individual Package.swift file.
  3. Our codebase is somewhat large but nothing crazy; ~120k LoC

Would gladly switch up our setup with either of those (i.e. ditch macros, manually gen OpenAPI functions, or stop defining local packages with SPM) if it meant saving us 30-60 mins per day.

Appreciate in advance any advice anyone might recommend!


Have you tried Xcode 15.3 beta? We removed all our plugins because it was too much hassle but using pre-build scripts on schemes have started to cause other issues so looking at moving back to plugins.

removed all our plugins because it was too much hassle

Was the hassle that it was causing this internal inconsistency error? Or other things.

Hi Josh,

It was stale builds that killed it for us and we didn't look again until just recently. With Xcode 15.2 it seems like our prebuild command isn't causing consistency issues or any stale builds :crossed_fingers:

15.3b1 was unusable for us due to excessive internal inconsistency errors. 15.3b3 is much better, but anecdotally still seems worse than 15.2.

(There are also other problems in 15.3b3, unrelated to this thread, that make it a nonstarter — swiftc bugs and an inability to run tests on an iOS simulator)