Practically forever (just half kidding). There is no time limit. With your I-485 having been filed and pending for more than 180 days you are in great shape to "port" to another employer, as long as in the "same" or "similar" "occupation".
Kindly be advised that the answer above is only general in nature cannot be construed as legal advice, given that not enough facts are known. It is your responsibility to retain a lawyer to analyze the facts specific to your particular situation in order to give you specific advice. Specific answers will require cognizance of all pertinent facts about your case. Any answers offered on Avvo are of a general nature only, and are not meant to create an attorney-client relationship.
If your I-485 remains pending, you qualify to have your EAD extended. File for the extension 90 days before the current expiration date.
The herein content is for general informational purposes only, and may be predicated on incomplete facts. It should not be relied upon in making legal decisions or assessing your legal rights or risks. Neither does the herein reply create an attorney-client relationship.
You can remain in the U.S. as long as your I-485 is pending. You should continue to renew your EAD.
Mr. Shusterman's (former INS Trial Attorney, 1976-82) response to your question is general in nature, as not all the facts are known to him. You should retain an attorney experienced in immigration law to review all the facts in your case in order to receive advice specific to your case. Mr. Shusterman's statement above does not create an attorney/client relationship.