Wiktionary
throw a spanner in the works
vb. (context idiomatic UK English) To be a problem, dilemma or obstacle, something unexpected or troublesome.
Usage examples of "throw a spanner in the works".
All this cease-fire does is throw a spanner in the works and save them.
Anything to throw a spanner in the works of the marriage, anything to unsettle Gregor.
Mark you, someone like you is calculated to throw a spanner in the works no matter what you do for a living - sort of wild variable.