how long i can stay with filed H1b extension

I have already resigned from my company, and I have new employer already filed my I129/I797 under premium processing ,however due to delayed premium processing ,if it get delayed ,can I stay in US officially/how many days without job and having extension filed by new employer.

I have existing petition which is valid till next 2 year.

In theory you are immediately out of status, but I have personally been between two jobs for almost 2 months and USCIS has never complained. Frankly you should have never resigned until you atleast got the receipt number. If you do get the receipt number go ahead and start working.