If you are buying in NY, it depends where - in order to answer your question correctly. The following applies to buyers:
Within New York City and the suburban towns along the border, buyers can sign multiple buyer agreements and you will not owe anything to your agent and most likely never be caught. Your situation that you described is perfectly fine. The reason it's OK is because the NYC area has a huge population of buyers and sellers and in NYC - multiple MLS systems. Agents are too busy to check the hundreds of real estate sale transactions on a daily basis and don't have time to verify buyers names against the hundreds of transactions just to see if their client's name came up on a sold listing with a different agent. It is very time consuming and agents need to spend their time on more important matters. For this reason, the odds of you getting caught is like 1%.
On the flip side, if you as the buyer submits an offer for the same property with 2 different buyer agents, then you will be caught because the listing agent will see your name on 2 different offers. That listing agent will call your agents and tell them you already submitted an offer with somebody else. In this situation, you need to tell the agent you don't want to work with that your agreement needs to be cancelled and their Office Manager needs to sign it.
If you are buying a home outside of the New York City metro area, then you will be caught if you sign multiple buyer agreements. The reason is the population is much smaller and agents do have time to check the MLS for sold listings and to match buyer names with sold listings.
As a former realtor, unfortunately I had to learn my lesson when one of my buyer clients signed multiple buyer agreements and lied to each agent. Sad but it seems to be a common practice in NYC for buyers to lie to agents about signing multiple buyer agreements. Apparently, word on the street is they know they can get away with it and not get caught. Unfortunately it is true.