Joshua Robb went missing earlier this week in the San Bernardino Mountains.
Thursday morning, his parents were in San Bernardino juvenile court trying to regain custody of the boy.
The judge gave the parents visitation rights until another hearing in 11 days.
Joshua was found after a 30-hour search in the mountains. He had run away from school.
His parents lost custody of him after allegedly tethering him in their backyard.
San Bernardino County Sheriff's deputies say the boy has a history of running away.