Thompson, 18, joined City after being released by his home-town club Middlesbrough three years ago.
He was a regular in the reserve team this season and scored against Middlesbrough's under-23s at Bootham Crescent in the North Riding Senior Cup. He also wore the captain's armband against Grimsby Town reserves last month.
"It's every lad's dream to be a professional footballer so I am really happy to sign a deal," he told the club`s official website. "I signed for Boro when I was about 9 but got released at 15 because of my height. No lad wants to be released but I came back stronger. I wanted to prove myself and it has motivated me to be where I am now.
"The last two years have flown by. It was a great opportunity to be a scholar, we had a great set of lads, and I have really enjoyed it."
Looking ahead to next season, Thompson said: "I want to push for the first team, show the manager what I can do, and prove to him that I am capable of being in the first-team. I want it to start as soon as possible."
Photo: Ian Parker/Ice Photography