Deus ex machina is a plot device where a person or thing is introduced unexpectedly and which provides a contrived solution to an apparently unsolvable difficulty. I fear accidentally creating these.
In my current project, I have several situations that require setup ahead of time so that when the story arrives at one of those situations, the solution does not come across as contrived. However, sometimes I haven’t fleshed out the events that would feel contrived if not properly setup ahead of time.
Tonight, I revisited earlier parts of the story to sow more seeds to cover the situations that are now beginning to take on their full form. This weaving of story elements into a complex pattern is fun, but I will need beta readers to tell me if the setups work to prevent deus ex machina.