Saw this on Reddit when I was googling to see what deeper lore, or more varieties of Inevitables I could come up with for a character backstory.
Iunno if 5e uses Inevitables, but, basically, Inevitables are ...kinda cosmic justice robots. They come from Mechanus/whatever place represents Lawful Neutrality in a given setting, they're constructs, and there are a handful of canon types who each are tasked with enforcing law in some way. Zelekhuts enforce literal justice, think bounty hunters, maruts enforce the law that everything dies, there are inevitables who enforce causality and the sanctity of divinity, and the Kolyarut exists to punish those who break oaths and agreements.
Here's what the 3.5 SRD says about Kolyaruts-
Kolyaruts mete out punishment to those who break bargains and oaths.
Before beginning a mission against a deal-breaker, a kolyarut learns as much about the contract or oath as possible. It’s not interested in those who break deals accidentally or against their will— only those who willingly break contracts violate the principle that kolyaruts are created to uphold. If a written contract was broken, the kolyarut typically carries a copy of the contract with it.
Kolyaruts are the most talkative of the inevitables, making credible attempts at social niceties such as proper greetings before getting down to the matter at hand. They can use disguise self to appear as almost any kind of humanoid—useful if they need to go undercover to catch their quarry.
First of all, the Reddit OP's "friends" are dicks. They would be fully justified in flipping them the double deuces and giving them a huge stink eye as they walk backwards out the door.
But, assuming someone were to find themselves in this position (and contrary to what some responders on the reddit post claim, wish can in fact force someone to agree to a deal, that's just duplicating the effects of dominate person), ...well, honestly, they should probably just leave, because that DM is not being reasonable, so it will come down to the PC fighting something seven levels above them.
*BUT*, assuming a reasonable DM, this could be a really interesting plot, assuming everyone was on board in the interest of telling cool stories.
-OP's character was magically compelled to accept a bad deal.
-Despite that compulsion, somehow, they broke the oath, and now a Kolyarut is on their trail.
-Kolyaruts, despite being, basically, contract lawyers from Hell, or perhaps because they are basically actually extreme contract lawyers, they are interested in having as complete a picture of the circumstances of the broken oath as possible.
-Kolyaruts are not interested in enforcing people who broke an oath against their own will, or otherwise did not voluntarily break their oath.
So, the thing for the player to do would be to reason with the kolyarut. This is an interesting case that will come down to judgement, because, technically, it seems, the PC broke the oath voluntarily. But they didn't make it voluntarily.
In real law, so far as I'm aware, generally, a contract signed, or oath sworn, under duress is considered void, invalid. It's going to vary by locality, but I believe that's fairly universal.
Of course, D&D doesn't necessarily operate on real law standards. But absent a DM telling you how the law, and especially cosmic ideals of law, work in their setting, it's a basis to work from.
Therefore, what the PC should do is, basically, sit and wait for the kolyarut to come to them, and then present the case that they were forced to make that oath. In real law, it is incumbent on the person who breached contract/oath that they were under duress when it was made. The PC would want to have some kind of evidence that they were magically compelled. They may only have witnesses, and those witnesses are probably just the other PCs involved, meaning they won't want to give honest testimony.
Unfortunately, kolyaruts cannot use zone of truth or the like, but they can use mark of justice. It would be reasonable for the kolyarut to put a mark of justice on the witnesses, with the trigger being "providing false witness when I ask you for testimony." This won't prevent the witnesses from lying, but it will cause them to suffer a bestow curse effect if they give false testimony, the kolyarut would know it triggered, and therefore, the kolyarut will know the witnesses gave false testimony. There is a slight problem here that a kolyarut can only use mark of justice once per day, which means multiple witnesses would need be handled over multiple days, but, eh, that's fine.
Now, this is where judgement comes in. By the SRD description of the kolyarut, they only disregard oaths that were broken unwillingly, not made. But, honestly, if people can be held to binding contracts and oaths made under duress, then the entire idea of lawful contracts falls apart, and therefore, personally, I feel a kolyarut, provided with compelling evidence that an oath was made under duress, would abandon their pursuit of the one who broke it. I also feel that the kolyarut would then consult with whoever the superiors of inevitables are about whether those who coerce others into making oaths are under their purpose's jurisdiction--and then show up again pursuing the person who made the wish and the one who took advantage of it. Possibly one or two zelekhuts in tow.
(now, I also wouldn't have this happen between PCs. The wisher and the one who took advantage of it would be recurring NPCs, but...)