Many YC founders did the same thing. They worked on their own startups with no salary under a student visa, and applied for H1B/O1 visas once they got funding. Is this illegal?
For H-1B or O-1 visa applicants, founders need to prove an employer-employee relationship with their startup and show funding or sufficient structure, which complicates the path from student visas.
Sources: • USCIS Policy Manual on Employment for F-1 Students • 8 C.F.R. § 214.2(f)