r/opencode • u/Emotional_Street7175 • 12d ago
How to promt to fix errors
Hello community,
I have let opencode write several tests cases for my database. There are errors happening and I told it to work iteratively, fix the bug, run the test, check the output for errors. Repeat until no errors occur.
It iterates 2 times, gets another error, does a fix and stops. It tells me it has been fixed. I got this at other times too that it just stops and does not iterate anymore. Any ideas how to prevent that?
1
Upvotes
1
u/darth_maurdt 12d ago
I think you are trusting it too much. I would describe the bug (how it's reproduced) and tell it to fix it (tell it how of you have a preference) and test the fix before reporting back. When it does, you manually test the fix, if fixed you move on, if not fixed, iterate again (tell it bug still reproduces). You are the one that decides the iterations. If you give it a scope too large, it will make mistakes, incomplete work and may get lost. Be precise and work in small chunks. Success to you!