1. You can't expose your developing negatives to light during development (unless you develop by inspection, and then you use a very, very dim green safelight for just a few seconds to assess development progress). Tray develop in complete darkness.
2. Tray rocking is totally inadequate for agitation. Lift the negative(s) out of the developer, turn them 180° and then re-submerge them in the developer. Most of us tray developers develop several sheets at a time, shuffling the film from the bottom to the top. I go through my stack once every 30 seconds. That means shuffling once every five seconds for six sheets of film, once every 10 seconds for three sheets, once every 15 seconds for two. If I'm only developing one sheet, I lift it out and re-submerge it once every 15 seconds.
You negatives are thin because 1) you did not agitate adequately and 2) you may not have the correct developing time and 3) as you said, your developer might have been exhausted. Test for your correct developing time after you have mastered the agitation scheme. I recommend practicing with the lights on with a few scrap sheets, then with your eyes closed (or the lights out) till you get the hang of it.
The big danger with tray developing more than one sheet at a time is scratching the negatives. It takes some practice and some skill to be able to tray develop consistently without damaging the film. Some never get it and switch to more expensive and more automated developing methods.
For me, however, tray developing remains my basic method. Once mastered it is quick, low-tech, requires little equipment and is extremely flexible.
Oh yes, if you are tray developing more than one sheet at a time, you need to pre-soak to ensure that the negatives won't stick together in the developer (they will if you don't!). I submerge my batch of negatives into the pre-soak tray one at a time in 15 second intervals to keep them from adhering to each other in the water bath. If they do, you have to gently, gently and slowly, slowly work them apart (they'll come apart by themselves after a while, but you can speed up the process by helping the water soak in between the stuck negs). Don't pull hard or you'll damage one.