In Angel in the Whirlwind: The Oncoming Storm, Kat Falcone intercepts a ship carrying a princess of the Theocracy who is trying to defect to the Commonwealth. She alerts Kat to a fleet buildup on the border planning to invade, and Kat goes to check it out and ends up blowing the lid off Admiral Junayd's entire plan, forcing him to launch the invasion right then, before his supply lines have caught up, or risk having the Commonwealth 6th Fleet actually be ready for him.
Forward the Foundation: Amidst the chaos surrounding high-level plots and counter-plots, Galactic Emperor Cleon I is assassinated by a totally insignificant palace minion, because he (Cleon) was insisting on promoting said peon, against the peon's fervent wishes, from "gardener" to "chief gardener".
Initially, the sophomores plan to leave the freshmen from Earth on the primitive planet for one night, but a stray meteor damaged their ship. After repairs and everything, the sophomores get back to the planet eight days later.
In The Dance of Time, the final book of Eric Flint's Belisarius Series, there is a side plot of a Malwa assassination team tasked to kill Byzantine Emperor Photius and Empress Tahmina but keeps getting foiled by unexpected changes of plans of their targets. The team follows them for thousands of miles while the plot of the rest of the novel occurs around them. At the end they run across the fleeing Malwa emperor and the Big Bad (currently inhabiting the body of an eight-year-old girl). They kill him and his guards and wound her, which makes it possible for the good guys to finally achieve complete victory. They get rewarded by being sent into exile with the series' Manipulative Bastard.
The Black Tattoo is an incredibly epic example. Jack Farrel began as an Audience Surrogate who was only there because his best friend Charlie refused to join the secret society dedicated to protecting the world from a demon known as the Scourge without him, and really had no greater purpose in the main plot. Charlie's foolishness and arrogance get Jack accidentally sent to Hell, but Jack's determination and desire to help his friends eventually drive him to help Action Girl Esme stop Charlie and the Scourge, and it's his actions that ultimately wind up saving the world.
In Bystander the villains run into a very severe example of this, when they have a great plan to capture Lucretica, and are foiled by two details. One, they have a severely incorrect estimation of her power level, and two: Her feet don't touch the ground.
Miss Emily Dorothea Seeton, created by Heron Carvic. She's difficult to describe. As far as she's concerned, she's a retired teacher the police use as a sketch artist, not an amateur investigator. So when the bad guys come after her, she usually has no idea why they're doing so. Her reactions usually end up with the villains in custody, the case closed, and quite possibly police trying to write reports that make sense.
Sarl and the Vord would have won if it wasn't for one person: Canim ambassador Varg. He managed to figure out their plan, and because he doesn't like the duplicity involved, goes out of his way to stop it. They did plan for him, but they figure that because he is hated, nothing he says will be believed. And they would have been right, had Varg not ended up skipping diplomacy and outright dragging Tavi to the Vord nest, alerting Tavi to the threat and allowing him to prepare.
Tavi's aunt Isana was also an unknown factor. She knew about the Vord from Calderon, and it was because she cut a deal with the Aquataines (whom she had hated before) to get support for the legionnaires fighting the Vord in Calderon, and got Invidia Aquitaine to counterattack the Vord, breaking their attack.
In the next book, Cursor's Fury, Tavi, who was in need of bribe money, steals a purse from an officer who had it out for him and in doing so saves Alera from the Canim. How did he manage that? The purse was part of a plan to let a traitor assume control of the one legion that stood in the Canim's way. The idea was that Canim ritualists would strike the officers' tent with lightning during a meeting when they were all sure to be inside. The traitor would have a stone that would No-Sell the magic, and allow her to take control of the legion and force them to walk away from the important strategic point they were guarding. The purse that Tavi stole belonged to the traitor and had the stone inside. She was not able to find the stone, and so was forced to flee. The magic lightning struck on schedule, but because the traitor was not there, control was instead handed over to Tavi, who managed to lead the legion to victory. For added Spanner-ness, that very stone was a big part of Tavi's plan to ultimately defeat the Canim.
Cradle Series: The divine Judge named Suriel decides to show mercy on Lindon by showing him a way to avoid the fated destruction of his homeland in thirty year's time. She is soon called by her peers, who mention that this has had serious consequences for the fate of the planet as a whole. Suriel is shocked—even if Lindon had beaten the million to one odds, saved his homeland, and even ascended from his world entirely, the planet's ultimate fate shouldn't be affected. She is right; her peers find her innocent of making major changes. The problem is that her minor change unexpectedly interacted with a much more major change someone else did: Ozriel, the missing Judge, had given a memory and a mission to one of his descendants, Eithan Arelius. When Eithan encountered Lindon, he immediately took him under his wing, greatly increasing his chances of growing stronger and affecting the world, and everything started going off the rails.
Pick any Clive Cussler novel. The villains have amazing, incredibly and often brilliant ideas that can't possibly fail. Then enters a NUMA oceanographer/adventurer (Dirk Pitt or Kurt Austin), the able crew of a seemingly-run down cargo ship (The Oregon Files) or a treasure-hunting husband and wife (Sam and Remi Fargo) and everything goes completely to pot.
In Iceberg: Kristi Frye reveals that she's actually her supposedly "dead" brother Krisjan, having faked his death to undergo gender reassignment surgery and be the woman he's always wanted to be. She relats how she planned to use the Hermit Limited company for her own means to help the world. But "the totally unexpected and unforseen coincidence spelled disaster to the new life I had carefully planned": Of all the plastic surgeons in the world, Krisjan had to pick one who worked for Hermit Limited, told boss Oskar Rondheim and thus gave him the perfect material to black mail Kristi.
In Night Probe, bank robber Kyle Massey had a brilliant plan: hijack a train of gold, make it look like it fell into a river via a broken bridge and reroute it to a mine. After sealing off the entrance, Massey could force the passengers to help unload the gold which he and his men would take through a tunnel and leave the passengers to get back to civilization. Pitt lampshades how "the best laid plans, etc." ruined it: When he sealed the entrance, the explosives opened up fissures and caused water to seep out and flood the escape tunnel, condemning everyone in the mine to a slow death by starvation.
The same book has villain Floss Gly brilliantly impersonate Henri Villion, a man about to become the leader of a newly freed Quebec. Even Villion's own wife and mistress fail to see this is Gly in disguise. He goes to Canadian prime minister Savraeux for a meeting. What Gly doesn't know is that Savreaux knows that at this exact moment, the real Villion is having a liason with Savreaux's wife and thus this has to be a convincing imposter.
The titular assassin of Frederick Forsyth's The Day of the Jackal seems well ahead of the international police effort to stop his attempt on Charles de Gaulle until some things come up to derail his plan. Just one of many comes up when his seduction of a baroness to gain a hiding location falls apart when said baroness eavesdrops on a call with his informant, forcing him to kill her and letting the police make him publicly wanted as a common murderer.
And ironically, his last spanner was de Gaulle himself, who leaned forward to kiss a recipient on the cheeks instead of shaking his hand like the Jackal expected, therefore making the Jackal's shot miss and giving Lebel enough time to stop him.
In The Demon Headmaster books, Dinah manages to be both this and an Unwitting Pawn at various points. The Headmaster can easily hypnotize her, and she's very close to being his greatest asset, but she's just intelligent enough to shake it off and bugger it all up at the last minute. For the record:
Book One is the one where they meet. He doesn't know her capabilities.
Book Two has him not knowing her new name.
Book Three has him not even realising she could figure it out.
Book Four has him specifically targeting her for her DNA.
Book Five has his clone, who doesn't even know she exists. Dinah stumbles on this one purely by accident.
The final book has him attempting to demoralize her. He almost wins, and would have had Dinah not had a last-second burst in hearing capability.
DFZ: Dr. Lyle's accidental death screwed up everyone's plans. It of course screwed up Lyle's plans to lay low until the time was right, but it also screwed up his employer's plans to capture him and torture him for the ritual site. In fact, they spend most of the book under the mistaken impression that he is still alive, screwing themselves over several times as they make decisions based on that assumption.
Rincewind never wants to get involved in events, being a coward. In Interesting Times, his great ambition is to stay as far away from the villain's Evil Plan as possible. However, he always seems to run away from danger in the direction of even more danger... until he winds up cornered and desperate, at which point he does the right thing in spite of himself.
Some of the more inept members of the Ankh-Morpork City Watch, especially Sergeant Colon and Corporal Nobbs, fit this trope. The Watch book Thud! also has Brick the troll, who literally stumbles onto a plot to frame trolls for the death of a well-known dwarf.
In the ending of Making Money, protagonist Moist von Lupwig is on trial for the (past) mis-tradings of the bank he is in charge of. Cosmo Lavish and Cribbins are planning to use this opportunity to absolutely discredit him by revealing that before being Chairman of the Bank (and before it, Head Postmaster), Moist was a professional conman and thief and still had a death penalty extant on his nomme de felonie. The first thing Moist does in his witness speech is confess to exactly these crimes, and he remarks internally that he can see the distress in Cosmo and Cribbins' faces immediately.
Being Divergent makes Tris immune to the mind-control serum, which allows her to ultimately stop the attack on Abnegation.
Kender, gully dwarves and gnomes in the Dragonlance series...especially (by their very nature) the kender. While all of the above races have the ability to change events in the past through time travel, due to their origins as races created by the Greygem of Gargath (pure Chaos-in-a-rock), kender have innate fearlessness, insatiable curiosity, guileless but mischievous personalities, and chronic kleptomania as racial traits. Tasselhoff Burrfoot, for example, is both the Unwitting Pawn of Raistlin's evil schemes and the only person unpredictable enough to screw them up. One of the most dreaded sounds on Krynn is the sound of a kender saying 'Oops.'
Given the choice between being locked in a room with a hungry dragon or a bored kender, anyone with any sense picks the dragon.
Remember, the cruelest thing one can do to a kender is lock him up. The cruelest thing one can do to anyone else is to lock them up with a kender.
Harry in general serves as this for many a grand villainous plan, in much the same fashion as John McClane.
Changes: The heroes are able to narrow down the location of where the sacrifice will occur because even though the records for the first shipment were destroyed, the Red Court still had to transfer another shipment due to the fact that the previous shipment was incomplete due to minion carelessness. As such they needed to keep one copy of the records intact until after the final checkup and they kept the records in the van they needed to use to transport the goods. As such Harry is able to narrow it down and eventually find Chichén Itza, enabling him to blow the Red Court's plan sky high.
The Gatekeeper himself lampshades this in Cold Days.
The Gatekeeper: Unwittingly or not, virtually your every action in the past few years has resulted in a series of well-placed thumbs in the adversary's eye.
Elsabeth Soesten: In No Good Deed..., Elsabeth and Hieronymus accidentally foil Cuncz's plans to steal incriminating information about himself from Father Garnerius when Garnerius hires them to recover the reliquary (where the Abbot stashed the documents) stolen by Cuncz's agents. Cuncz just shrugs off the setback and hires them to finish the mission instead.
In the Dale Brown novel Executive Intent, Wayne Macomber would have avoided capture by GRU agents had he not stumbled over a random civilian in the wrong place at the wrong time, who proceeded to inform the police and make the already suspicious GRU agents take action.
The Expanse: Jim Holden and the crew of the Rocinante. Their ability to screw up the plans of humanity's biggest movers and shakers just by being in the exact right (or wrong, depending on perspective) spot at the right time is so great that eventually some of said movers and shakers decide to make use of it by having them sent into a situation they want screwed up. Of course, Holden promptly derails that plan as well...
A ditzy cultist hands the newborn Antichrist off to the wrong unsuspecting parents in the beginning of Good Omens, thus setting off a plan that derails Armageddon itself. Of course, this may have all been a bigger Gambit Roulette planned out by Powers That Be.
In Harry Potter and the Half-Blood Prince, Draco Malfoy's act of disarming Dumbledore completely derails the gambits that both Dumbledore and Voldemort had in place in regards to the Elder Wand. Though with a bit of luck it ends up working out great for Harry himself.
Draco's father, Lucius, also ends up putting a spanner in the works of Voldemort through needlessly petty personal vengeance. Lucius hijacking Voldemort's teenage diary (which he didn't know was a Soul Jar) for a personal vendetta against Arthur Weasley not only led to the diary being destroyed, but it provided Dumbledore damning intelligence to track down all the rest of Voldemort's horcruxes.
Severus Snapes love for Lily ends up as the ultimate spanner for Voldemort and as the catalyst for the entire series: his wish for Voldemort to spare Lily leads to Voldemort offering her a choice that enables her sacrifice to protect Harry and destroy Voldemort for the first time, also making Harry a Horcrux. This, along with Voldemort unknowingly losing Snapes loyalty due to Lilys death, enables Dumbledore and Snape to prepare Harrys path to defeating Voldemort once and for all.
The Havenites' plan in the first book relied on the laziness and incompetence of Basilisk Station's CO, Pavel Young. When Honor was assigned to the station, she was supposed to serve under Young. What actually happened was Young immediately left Basilisk for "much needed" repair work on his ship, with the hope that leaving Honor in the lurch would ultimately sink her career. In his pettiness, Young took his own incompetence out of the picture and replaced it with an officer bound and determined to do her duty despite her limited resources and possessing the competence to do so.
She's hardly the only spanner. There's the Medusans who figure out how to make their own rifles, and a man who has a massive grudge against the Manticoran navy and thus makes a raid literally blow up in their faces.
This trope is sort of discussed in the second novel, where the protagonist explains to her subordinate that the best swordsman in the world doesn't fear the second-best one, but the worst swordsman in the world, because he can't predict what the dumb son of a bitch will do.
Apparently there is some truth in that. An inexperienced swordsman is more likely to do something that gets both combatants killed than an experienced one trying to avoid dying.
A similar thing happens in The Age of Unreason series, where a guy is killed by someone who cannot fence at all; he automatically assumed his attack was a mere feint, because no fencer would make such a clumsy attack. Too bad his opponent is not a fencer...
A character in Echoes of Honor is known as "Silver Spanner" Maxwell, after a Noodle Incident involving a dropped spanner produced spectacular (and expensive) results, six years previously.
Aivars Terekhov pulls this in The Shadow of Saganami when his ship happens to encounter the same ship, using two different identities on two different planets, running weapons to terrorists on two different planets. Using evidence found on that ship, Terekhov figures out the antagonists' plan and quickly rushes to put a stop to it. The best part is that they only noticed the discrepancy because Aikawa Kagiyama, the midshipman on watch, was bored, so he ran a detailed analysis on a random freighter.
Arnold Giancola is this on a couple of levels. His actions doctoring diplomatic correspondence led to a resumption of the war when his plan to score a political coup backfired spectacularly. Despite other characters believing he was, he actually was notpart of the Ancient Conspiracy making a power grab but instead acting on his own. Later, his purely accidental death further derails investigation meant to examine his original actions.
The Mesan Alignment has been the victim of more than a couple spanners since becoming the Big Bad of the series:
Near the start of the series, Rob S. Pierre's son is killed in the opening skirmish of the Haven-Manticore war. The anger drives Pierre to organize a coup to overthrow the Alpha Lines known as the Legislaturalists.
The whole reason the Alignment resorted to installing the Legislaturalists to rule Haven in the first place was that the pre-PRH Havenites, being sticklers for human rights and a regional superpower to boot, were constantly ruining the Alignment's gambits for Galactic domination through genetic manipulation simply through the basic decency of their officers and the power of their Navy. Installing a controlled and inefficient hereditary government that crippled its own economy (that later tried to fix this by conquering their neighbours) allowed the Alignment to both shift Haven's interests elsewhere and ruin their previously stellar reputation. It took at least 400 years, the largest war in humanity's historynote The Battle for Manticore in the last stages of the Havenite wars, described in At All Costs in all its gory details, was the single largest pitched battle ever fought by humans since the beginning of time. and two revolutions to fix.
Following the Green Pines incident, they placed the blame on Manticoran agent Anton Zilwicki, as he was confirmed to be there and they Never Found the Body. Coupled with Zilwicki and Victor Cachat's transport breaking down and requiring more time to return home than they would've needed otherwise, they had every reason to think he was dead. Not only are Zilwicki and Cachat alive, they also successfully extracted Dr. Herlander Simões, a defector. So not only do they get caught in a lie, now that Zilwicki can challenge their version of events, but Simões has just enough information to alert Manticore and Haven of the Mesan Alignment.
In Shadow of Freedom, the Alignment's operatives have been going to worlds on the Solarian League's borders, posing as Manticorans and offering aid to various La Résistance movements. The idea was to damage Manticoran PR by having these movements' failures appear as though Manticore offered aid then left them in the lurch. This plan is Spannered by one world seeking to contact Manticore independently, alerting them of the plan on the one hand, and Manticore being actually all FOR the aid on the other.
The Hunger Games brings us Peeta Mellark, who is an interesting spanner because he's not actually trying to ruin anyone's plans, he just refuses to let himself be changed by the circumstances of his life. Because of this, he's actually a spanner to everyone around him, not just the bad guys. In the first book, his love story with Katniss, and later her playing along with it, causes the greatest upset to the Capitol's power that any tribute has managed in history, forcing them to allow two victors. In the second book, he screws over the rebellion and Katniss by volunteering for the Quarter Quell in Haymitch's place, but then hurts the Capitol's power base even more by claiming that Katniss is pregnant, leading to many Capitolites themselves calling for the Games to be cancelled. And in the third book, Snow essentially brainwashes him to turn him into an attack dog pointed right at Katniss, and when Coin realizes that Katniss won't be controlled, she basically lets Peeta go hoping for the same result. Peeta responds to this by overcoming the brainwashing through sheer force of will. Before him, it wasn't believed that this form of brainwashing could be overcome.
Tom Clancy's Jack Ryan: In Executive Orders, a pair of domestic terrorists spend most of the book preparing a massive cement truck bomb to kill Jack Ryan, driving it all the way across the country, dodging roadblocks put up as a result of The Virus spread by the otherBig Bad of the book, only to be pulled over and arrested by a random Highway Patrolman just doing his job when they panic.
In one of Francoise Rivier and Michel Laponte's Jonathan Cap books, recurrent character and local Plucky Girl Juliette becomes this. She has her appendix removed in a Parisian private clinic and notices that both her doctor and the nurse in charge of her are acting strange, notifying Jonathan's Kid Sidekicks Alex and Nico about it so they can call Jonathan and investigate. It turns out the doctor is the Big Bad of the book, with a complex plan involving an Arabian prince and his Body Double (the Big Bad's "disciple"), and the nurse is his forced accomplice because he threatened to kill her if she didn't collaborate. The plan would've gone smoothly, had the Big Bad not been pretty much forced by the circumstances to be the doctor in charge of Juliette's emergency surgery...
In the Land of Oz, the first spanner was Oscar Diggs. He quite literally lands in the middle of a Succession Crisis (King and Queen dead, only heir is an infant girl, four Witches set to go to open war with each other for control). Magnificent Bastard he is, he uses a combination of bullshit, carnival tricks, technology, and mistaken identity to create an Enforced Cold War and set himself up as a God-Emperor. The peace is fragile, but holding. Years later, a tornado brings the second spanner in the form of Dorothy, who accidentally squishes the East Witch with her house and wrecks the whole balance of power, setting off the chain of events that leaves both West and East Witches dead, Diggs exposed as a fraud and fleeing in terror, and paves the way for now-grown Ozma to escape the slavery Diggs sold her into and reclaim her throne.
In Leviathan Eddie Malone pretty much has this as his job. He's a very affable man, but he's also a reporter chasing after a story. He likes and helps out the protagonists, but he can't go too long without sending something back to his editors, and he has a knack for research and finding out very important secrets, as well as a genetically engineered frog who can memorize and repeat things said in its presence. For example, in Behemoth, he's responsible for getting an interview with Alek into the papers, and almost would have revealed the Committee for Union and Progress's plan too early, but he's also the only reason it succeeded, as he warned Alek about the giant Tesla Cannon, which would have destroyed the Leviathan and left the C.U.P. vulnerable to the ships Goeben and Breslau.
In order to destroy the One Ring and defeat Sauron once and for all, Gandalf develops an Indy Ploy / Batman Gambit to sneak the ring right under Sauron's eye into Mordor and Mount Doom, the one place it can actually be destroyed. It almost worked except the One Ring itself spanners the plan by finally corrupting Frodo. Then Gollum anti-spanners the One Ring's spannering by grabbing it and accidentally falling into Mount Doom. Supposedly, Gandalf knew that the Ring would ultimately corrupt Frodo, especially since it would be the most powerful within the Cracks of Doom, and that another Spanner like Gollum would have to occur for the plan to work.
Merry, Pippin, and Sam are all Spanners to some extent as no one, not even Frodo, wanted them to come along on the quest. Even so, each one of them took actions that enabled Sauron's downfall.
Hobbits in general appeared to be spanners in the setting. They were so beneath Sauron's notice that he never thought about them when making his rings. Men, Dwarves, Elves...they all had weaknesses and desires he could exploit. Hobbits just wanted to farm their land, eat the results, and be left alone. Sauron had little to tempt them with, which left them with a natural resistance to the Ring's power. However, they were far too small and physically weak to pose any kind of threat...and then Gollum gets that ring, setting off a convoluted set of Disaster Dominoes that ends with his downfall.
As revealed in Tolkien's other works, it's a little more a question of faith on Gandalf's part; he is literally an angel, a messenger from the divine, and he is certain that there is a god who watches over the people of Middle Earth. His cryptic comments about "the pity of Bilbo deciding the fate of many," and "my heart saying Gollum has a further role to play before the end," coupled with Frodo's growing sensitiveness to these things and his threat to Gollum that he could, "command him to leap off a cliff or throw himself into a fire" certainly hint that the Big Good Eru willed Gollum to be the Spanner.
The Noldor show up in Middle Earth and throw a spanner in Morgoth's works as a result of Feanor getting them kicked out of Valinor. In particular, Feanor's son Maedhros is such a clever tactician that he manages to drive back the army of balrogs and orcs all the way to the gates of the Angband. This makes Morgoth decide to trick him, and capture him. But then Fingon shows up out of the blue and throws in another spanner by saving Maedhros.
Humans are also a spanner in the works (set up by Eru), as are the Sun and the Moon. The Sun first rises at the same time as the humans woke up in the East. When they show up, there is a mad scramble for their allegiance because they are very numerous and quite powerful. The elves manage to drop the ball though.
Luthien is a spanner in the works, managing to steal a Silmaril from Morgoth without violence. The (talking) hound Huon then acts as a spanner, by saving her butt after Morgoth wakes up.
Earendil shows up to the War of Wrath with his flying ship Vingilotë and throws a spanner in the works by killing Ancalagon the Black, the biggest of Morgoth's dragons (who crushed an entire mountain range when he died).
Uldor managed to completely screw up the good guy's plans by being a traitor to Maedhros. On the eve of a huge battle against Morgoth, he betrayed Maedhros and switched teams meaning that Maedhros had to start the battle early. This set off the disaster dominoes and well... it's called the "Battle of Unnumbered Tears" for a good reason.
Glaurung was a spanner in the works for Turin, by revealing to Turin that his wife was his sister. oops.
Nobody predicted the half-elves, so they functioned as a sort of spanner in the works.
Ulmo, one of the Valar acted as a spanner in the works by turning Elwing into a bird so that she and Earendil could get to Valinor, instead of letting her die.
The Silmarils themselves acted as a spanner by burning Maedhros and Maglor (the two remaining Sons of Feanor) when they finally recovered them. Maedhros killed himself and Maglor threw his away: making all the horrible stuff they did to recover the jewels a total waste.
Glorfindel was a spanner in the works during the Siege of Gondolin by being crazy and tackling a balrog. It resulted in his death, but saved Idril, her husband Tuor and their son Earendil. Due to his heroic sacrifice he got reincarnated and given angel powers. He then goes on to be a spanner in the works again, during The Lord of the Ringswhen he randomly shows up and takes Frodo to Rivendell. During this sequence he uses his powers to terrify the Ringwraiths. Sauron evidently did not realize Glorfindel was back.
Mark Twain's short story "Luck" speaks of Lieutenant General Lord Arthur Scoresby, V.C., K.C.B., etc., a complete idiot who got on the fast track to war hero-ism because he got his left and right mixed up in battle and accidentally led his regiment right into where the other side was preparing a surprise attack, and drove the ambushers into full retreat because there was no possible way they would be discovered in time, and so didn't prepare.
Malice Aforethought ends with Dr. Bickleigh's plan to get away with the perfect crime being derailed by drain pipes (It Makes Sense in Context).
The thriller Maxwell's Train has this going both ways:
Harry Maxwell and friend Daniel comes up with a truly brilliant plan to rob a train of several million dollars as it's en route from New York to Washington D.C. In a truly epic case of bad timing, the very night they pull the robbery, the train is taken over by a pack of terrorists out for both the money and some United Nations diplomats. Their leader has the ultimate plan of setting off anthrax on the train while she and her team make a getaway.
For her part, the terrorist leader had spent two years planning this entire operation down to the smallest detail and prepared for a Special Forces attack and other problems. She's completely unprepared for Harry, Daniel and a small band of ally passengers to work together to undo the entire thing.
In One Of Us Is Lying, Addy reaching out to Janae after finding her crying makes Janae unwilling to frame her, and allows Addy to get her to open up, ultimately resulting in the truth coming to light.
In Rainbow Six, Eddie Price's pipe-smoking after success missions is the first in a series of little things that clue The Dragon in to the true nature of Rainbow despite efforts to hide it. Carlos the Jackal's fellow criminals, in carrying out an attack to try and get him freed, gets the team some good publicity that gets them to view the Sydney Olympics for free and puts them in the right place to foil a vital part of the villain's plan. One of the villains' captives manages to get off an email, the investigation into which eventually helps lead the way to them. One of the named minions tells The Dragon, hitherto ignorant of the truth, about the extent of the plan, prompting a vital Even Evil Has Standards moment that causes him to go to the good guys with the information, allowing the case to be cracked.
In Queste, the fourth book of Septimus Heap, Jenna and Beetle are this to Tertius Fume's plan to kill Septimus with the Queste.
John "Anjin-san" Blackthorne in Shogun is a rather magnificent one, as circumstances force him into a key role in the Gambit Pileup of choosing Japan's next shogun in the year 1600. And he's based on a real guy, to boot.
The A Song of Ice and Fire book A Feast For Crows has Lysa. And Jaime. And Robb. And Allerie. And Roose. And so on and so forth. Westeros is so awash in spanners it's a wonder that it's ever experienced peace. But of course, as anyone who's finished Dance with Dragons knows, Varys is the motherfucking king of all spanners.
As early as the first book, Bran witnessing Jaime and Cersei's incest and getting pushed out a window is a huge spanner. It was a complete coincidence and no one- not even chessmasters like Littlefinger or Varys- could have predicted it, yet it directly sparked a chain of events that would eventually lead to the War of the Five Kings, the main conflict of the series.
Joffrey can also be a spanner at times: While for the most part he's fairly predictable, his cruelty and insanity occasionally lead him to do things that no one would expect, such as ordering Ned Stark's execution, despite his mother and Varys and Grand Maester Pycelle all telling him to let Stark join the Night's Watch instead. And let's not forget that even before he became king, he was the one who sent an assassin to murder the comatose Bran, just because he'd heard a passing comment by his father about how the boy would be better off dead.
Edmure Tully combines this with Nice Job Breaking It, Hero! when, on his own initiative, he leads a successful attack on Lannister forces that not only derails Robb's plans to trap said Lannister force in their territory but delays them enough to receive word of Stannis' attack on King's Landing. This allows Tywin Lannister and his forces to go be Big Damn Heroes, derailing Stannis's bid for power.
One of the lingering plot points is the state of Robb Stark's successor. Robb 's death has lead to a power vacuum in the North. Knowing that this may happen, Robb named his half-brother Jon his successor in the North, ahead of his younger and full-blooded younger sister Sansa. Considering that poor Sansa was, at the time, a political prisoner, this will screw over both the Lannister's and Littlefinger's ambitions to take control of North if this comes to light.
Arya Stark embodies this, by virtue of being the completeopposite of what's expected of a sheltered, aristocratic girl. The Lannister's ambush and capture of the Starks is derailed because they didn't expect Ned's nine-year-old daughter (who had been overlooked in favour of her more important sister) to have the skills to escape or a swordsmaster to help her. For the rest of the series, virtually all the nobles assume she couldn't have survived on the run and is long gone. In fact, Arya has been present at multiple crucial events across Westeros disguised as a commoner, including contributing to the Fall of Harrenhal, allying with the world's most infamous assassins and witnessing the murder of her family at the Red Wedding. Along with her little brothers Bran and Rickon - who are also assumed dead - her survival means House Stark isn't nearly as broken as everyone thinks and its heirs are still out there.
Balon Greyjoy is a big one for the Starks, and the fandom often considers him the worst strategist in Westeros. After receiving a request for an alliance from Robb Stark against the Lannisters, Balon proceeds with his plan to attack the North (and thus the one person offering to ally with him) with a naval force large enough to defeat some strategic points in the North with the element of surprise, but not actually near large enough to hold them. It's the equivalent of Iceland deciding to attack Washington D.C. during the U.S. Civil War. Sure enough, the conquests are overturned over the next few books, and the Lannisters shrug off Balon's request for alliance/rewards because he's already done the work for them before getting them to agree to any reciprocation. He falls under the category of a Spanner in the Works because his military strategy worked only to assist the Lannisters at the Stark's expense, and resulted in little gains and bad consequences for his own people.
Tales from the Mos Eisley Cantina: In "Nightlily: The Lovers' Tale", a local (decidedly unsavory) bureaucrat named Feltipern Trevagg was planning to turn Order 66 survivor Obi-Wan Kenobi in to the authorities (which would, unbeknownst to him, doom the Galaxy Far Far Away three different ways). Then he saw a gorgeous (by his own people's standards) ingenue named Nightlily, whom he made up his mind to seduce and whose heart or hearts he then meant to break. Unbeknownst to him, it was the custom of her people that on the wedding night, the bride ritually ate the entrails out of the groom after getting it on, and she was a major ditz who thought he knew this but was just so head-over-heels he didn't care. So Obi-Wan, Luke, and the two droids got off-planet after all.
The Stormlight Archive: Kaladin becomes one of several for the plot laid out by the Diagram, a supposedly-omniscient plan to save the world by putting King Taravangian in charge by killing all the competing world leaders. It's implied that all Surgebinders are Spanners, but Kaladin is the one we see the Diagram fighting most directly.
It is revealed that the Child-Goddess Aphrael and her priestess Sephrenia were this to The Man Behind the Man without ever realizing it until his plans were exposed.
Protagonist Sparhawk is essentially a personification of this trope. As the "man without destiny", no one can really divine or guess what exactly he's going to do in the future...not even the gods, who are scared shitless of him.
In the first book, Duke Roger's plot to use a healer-draining Mystical Plague to kill his cousin Jon and reclaim the position of direct heir goes off without a hitch. He had no way of knowing that one of Jon's fellow pages would have healing magic, particularly as Alanna was afraid of her magic and actively hid it until Jon's illness forced her to use it. Later, Roger accidentally triggers The Prophecy when he sends both of them off to a cursed city they end up cleansing it of the demons. After that, Roger goes to great lengths to kill her first so this won't happen again. His final plot to kill the Queen and magically hide himself from any suspicion is derailed by the fact that his waxwork was of the boy Alan, not the girl Alanna really was. If she hadn't hidden her identity to become a knight, it would definitely have been King Roger.
On top of that, Alanna wouldn't have confronted Roger if the Chamber of the Ordeal didn't decide to literally show Alanna her worse fear of Roger killing Jon by allowing her to claw through the bag keeping things obscured from her and the rest. For even more humiliation his berserk fury when he accidentally cut Alanna enough to reveal that he is actually a she resulted in Alanna getting the clear upper hand in the duel by being more clear-headed.
In the final book, Roger didn't count on Alanna learning to "let go", literally, making the sword he was using magic to call her over to him so he could get her blood instead fly from her hand and stab him, killing him again.
Gunner First Class Ferik Jurgen, assistant to Ciaphas Cain, turns out to be the one who most often saves the day, with his combination of being a "blank" who nullifies psychic powers and the fact that he carries a really, really big gun.
In Malodrax, Lysander steps in the middle of conflict which would elevate either Shalhadar or Thul as the leader of eponymous planet and begin the next dark crusade. With his meddling, neither Chaos power succeeds. Lysander himself only manages to escape and begin his "spannering" when a scalpel used in his vivisection breaks, giving him a lockpick.
Siege of Castellax is a double whammy: while techpriest Oriax sabotages the Iron Warriors throughout the novel, captain Rhodaan doesn't submit to Bolivian Army Ending planned for them and ends up being Spanner in the Works for Spanner in the Works.
In James Swallow's Deus Sanguinius, Rafen shocks Arkio's forces by being alive. Inquisitor Stele is quite glad that he will die in single combat, because he had landed in the plans by a fluke and quickly grown to "the most serious nuisance." Of course, he wasn't dead at that point...
Fireheart in Warrior Cats. He completely ruins Tigerclaw's plans by running into the cave where Tigerclaw was during a battle and beating Tigerclaw up.
Mat Cauthon in The Wheel of Time almost literally personifies this trope. He isn't stupid, but he's rarely clued into just what exactly is going on around him. Despite this he foils many schemes, especially when he's actively trying not to.
And similar to the line mentioned in Honor Harrington above, when the White Tower's weapons master tells Galad, Gawyn, and Mat a story about history's greatest swordsman, who was only defeated once in his entire life - by a random farmer with a stick.
Padan Fain also falls under this trope following his merging with Mordeth, frequently upsetting the plans of both the Dark One and the forces of the light.
In the historical novel Wings of Dawn: Thomas, to the Druids. Umar and Hadad, to Sir William. The Mamelukes and the bandit troops, to everybody.
In Wonders of the Invisible World, Jarrod, a completely ordinary teenage boy, becomes this to the protagonist Aidan's mother, a powerful seer. Aidan's mother has spent years trying to protect her husband and sons from a decades-old curse that causes all males in the Lockwood bloodline to die young by tampering with their memories and the memories of anyone familiar with them so that no one knows they have supernatural powers and the curse thus won't find them. She even erased most of Aidan's memories of his adolescence to accomplish this... however, there was one person she forgot to alter the memories of and that person was Aidan's best friend Jarrod who moved away shortly before she wiped Aidan's memories, only to move back several years later and start telling Aidan things about their adolescent days that Aidan doesn't remember, which causes Aidan to start pulling the thread on why he can't remember these things, which eventually causes his mother's plan to keep him in the dark about his own psychic powers and the family curse to unravel.