Based on the document below, an agent must NOT include infinite loop so "max lotusscript/Java execution time" works. Customer hope the setting works even agent include infinit loop.
https://help.hcl-software.com/domino/12.0.2/admin/othr_servertasksagentmanagertab_r.html
Max LotusScript/Java execution time
Specifies how the maximum number of minutes a LotusScript® or Java™ agent has to complete execution during this portion of the day. If the agent exceeds this maximum, the agent doesn't finish, and the Agent Log records the termination. Defaults are 10 minutes for daytime and 15 minutes for nighttime.
Increase the execution time limits to enable complex agents sufficient time to complete. Setting the value of this field excessively high may impact system performance, because the Agent Manager runs for a longer time to accommodate this agent.
Note: An agent that requires an unusually long execution time may include an infinite loop. Before increasing the execution time, review the agent code to make sure it functions correctly.
This is a misunderstanding on your side. The agent terminates after the given time (e.g. 10 minutes), no matter what causes the long runtime. An infinite loop will be stopped as well as any other long running code.
Domino does not understand, that you coded an infinite loop as those loops could be long and complicated.
The term "doesn't finish" means, the the agent does not finish the regular way.