You are fighting nondeterministic behavior with more nondeterministic behavior, or in other words, fighting probability with probability. That doesn't necessarily make things any better.
I know I'm psychologizing the agent. I can't explain it in a different way.
I fear thinking about problem solving in this manner to make llms work is damaging to critical thinking skills.
The problem is information fatigue from all the agents+code itself.
Assigning different agents to have different focuses has worked for me. Especially when you task a code reviewer agent with the goal of critically examining the code. The results will normally be much better than asking the coder agent who will assure you it's "fully tested and production ready"
(Sorry.)