One job ran for hours. It was not stuck: it tried, failed, and tried again, and each try looked reasonable from the inside. The owner called that unacceptable.
A budget for every run
Each agent run now has a time budget. The background test suite refuses a fourth start within one run. Neither limit knows why the tries are failing. They only know that a fourth identical attempt is rarely the one that works.
Stopping well
Hitting a limit is not a crash. The agent stops, keeps its work, and hands the job to the owner with a short account: what passed, what failed, and what each try did. A person reading that can decide in a minute what the agent could not in hours.