You need to get a cancellation in writing. You generally CANNOT cancel at anytime, unless that’s written in.
It’s a contract. There is an expiration date in your listing agreement.
Whatever they told you verbally may mean nothing.
Talk to the agent’s broker. Talk to the agent.