https://www.nasa.gov/feature/geminis-first-docking-turns-to-wild-ride-in-orbit
“Flight, we are docked,” Armstrong radioed back. “It was a real smoothie.”
Things had gone well up to that point. Shortly after docking, Lovell had a message from Mission Control Houston just before the spacecraft passed out of communications range.
“If you run into trouble, and the attitude control system of the Agena goes wild, just send in command 400 to turn it off and take control of the spacecraft,” he said.
The Agena was designed to obey orders from both the Gemini spacecraft and ground control. The Agena soon started a command program stored in its internal system. This instructed the Agena to turn the two spacecraft, but Scott noticed they were moving the wrong direction.
“Neil, we’re in a bank,” he said.
Armstrong used the Gemini’s orbital attitude and maneuvering system, or OAMS, thrusters to stop the tumbling. However, the roll immediately began again, and Gemini VIII was out of range of ground communications.
As Armstrong worked to regain control of the spacecraft, he noticed that the OAMS propellant was below 30 percent, an indicator that a Gemini spacecraft thruster might be the problem. Scott cycled the Agena switches off and on. Nothing helped.
Although it was not confirmed until later, a yaw OAMS thruster was firing erratically, later believed to be due to a short circuit in the wiring.
Not knowing, the crew’s first reaction was to blame the Agena. So Scott pushed the undock button, and Armstrong backed Gemini away from the Agena.
Without the added mass of the Agena, the Gemini’s rate of spin began to quickly accelerate. Soon after, Gemini VIII came in range of the tracking ship USNS Coastal Sentry Quebec, stationed southwest of Japan.
“We have serious problems here,” Scott said. “We’re tumbling end over end. We’re disengaged from the Agena.”
A surprised James Fucci, spacecraft communicator aboard the ship, asked what the problem was.
“We’re rolling up and we can’t turn anything off,” Armstrong said.
As the spin rate approached one revolution per second, the astronauts’ vision became blurred. The tumbling needed to be stopped.
Armstrong’s quick thinking led him to turn off the entire OAMS system and then use the re-entry control system, or RCS, thrusters on the nose of the spacecraft to regain command of Gemini VIII and stop the spin.