The oath is somewhat binding:
This is a classic problem called Kavka's toxin puzzle. I deal with it in the following simplistic way:
Some creatures take the oaths they swear under coercion seriously, while others don't. In my campaigns I rule this to be a function of alignment. In either case, though, they will only be able to swear it if they mean it at the time. In order to break the oath, then, they must violate what was previously in accordance with their will-- the oath is exactly as binding as any other fully-committed decision they make.
The following is the alignment-based adjudication I generally use for this, which has worked across a variety of ethical/jurisprudential system implementations.
A lawful creature is strongly bound by its will, and does not lightly change its mind. In general, in the absence of external forces, a lawful creature will continue unchanged indefinitely. A Lawful creature making an oath in the ZoT will not break that oath unless external forces act upon it. Even a lawful creature, however, may break the oath if sufficient new information is obtained, though doing so would be a Chaotic act.
A Neutral creature has agreed to the oath, but doesn't have the strong introspective skills regarding law/chaos that are necessary to actually predict ones future actions in this manner, though they may well think they have those skills. Neutral creatures are very likely to change their minds regarding the oath if any new information is revealed or if the oath proves either more or less inconvenient than they expected. Most neutral creatures will find mustering the commitment to actually make such an oath in the ZoT at least a little taxing.
Swearing an oath of future action while in the ZoT is a strongly Lawful act, requiring that the one so swearing truly believe they will do as they are swearing. Chaotic creatures, like Lawful ones, are aware of their nature, and will find swearing such an act all but impossible; torture and other extreme forms of coersion will be needed to force such a creature to make an oath-- even if they want to agree to do something in the future, they know there's a good chance they won't so long as they are thinking rationally. Even if tortured into submission, however, a chaotic creature will, more likely than not, break the oath anyways, even in the absence of external forces, and even without leaving the ZoT.
I haven't run this on a 'True Neutral' character yet, but such characters are usually just Lawful characters disguised behind some 'Nature' stuff.
Also I generally rule using ZoT this way a CE act under most alignment resolution systems I run.