Free agent defensive end Ziggy Ansah has agreed to a one-year deal with the San Francisco 49ers on Monday, shortly before the team received confirmation that second-year star Nick Bosa suffered a torn ACL in his left knee.

Bosa sustained the season-ending injury during the first quarter of Sunday’s game against the New York Jets, and additional tests performed Monday agreed with the initial diagnosis.

Bosa, 22, was the NFL Defensive Rookie of the Year in 2019 when he had 47 tackles, nine sacks, two fumble recoveries, one forced fumble and one interception in 16 games (14 starts).

The 49ers also announced later Monday that defensive tackle Solomon Thomas also suffered a torn left ACL on Sunday, ending his season prematurely. The former first-round pick (No. 3 overall) in 2017 had yet to record a sack in 49 defensive snaps over the first two weeks.

With the 49ers playing the New York Giants on Sunday for their second straight game at MetLife Stadium in East Rutherford, N.J., the club is staying at The Greenbrier resort in White Sulphur Springs, West Virginia.

Coach Kyle Shanahan said part of the problem in getting confirmations of medical results was due to some logistics issues.

“We had an MRI truck scheduled up here and that truck broke last night,” Shanahan said. “The local hospital is helping us out with MRIs, so that’s why we’re behind on everything.”

Shanahan did have an update on quarterback Jimmy Garoppolo, who suffered a high right ankle sprain against the Jets. Shanahan said Garoppolo is day to day and has a chance to play against the Giants but backup Nick Mullens will be prepared in case he is needed.

“If he’s good to go and the doctors say he’s healthy and he can go out there and protect himself, and if Jimmy feels confident in doing it and it gives us the best chance to win, if that’s the case, then Jimmy will be out there,” Shanahan said. “If Jimmy is not safe and can’t protect himself, then we’ll go with Nick.”

Running back Tevin Coleman (knee, reportedly expected to miss multiple weeks) will miss the game and starting running back Raheem Mostert (MCL sprain) will likely join him on the sideline.

Star tight end George Kittle (knee) sat out against the Jets and his status will be firmed up later in the week.

Shanahan confirmed the deal with Ansah, who previously met with the 49ers, but left the session before training camp without a deal.

Ansah has 50.5 career sacks in 91 games with the Detroit Lions (2013-18) and Seattle Seahawks (2019). He was the fifth overall pick in the 2013 NFL Draft.

The 49ers also could call up former first-round pick Dion Jordan from the practice squad.

Defensive end Dee Ford (neck/back) did not play against the Jets and also could be in jeopardy of sitting out again when the 49ers (1-1) face the Giants (0-2).