F1 OPT lost job and H1B application picked

I am currently on F1 OPT. I was working for Company A and I lost of job few weeks back. My H1-B application was picked in this years lottery, so it would become effective Oct 1st 2017. Company A has told they will not withdraw my application immediately and I have time until end of Sept to find another employer who would do the transfer. My question is can I start working on F1 OPT with Company B and end of Sept and the can apply for H1-B transfer later. Would this cause any issue or should I wait until end of Sept so Company B can apply for transfer?

Is your OPT valid until Oct 1st 2017? Was your H1b filed under COS or consular processing?

I believe if your OPT is valid past 10/1/2017, and no COS was filed for you, then you are still valid to work for any employers under OPT status. If COS was filed, then I am not sure of the answer as you will be kind of in between status at this point. I would seek the advice of an attorney…