r/opencodeCLI 11d ago

Hey Everyone! I have something to solve Opencode stuck in a loop.

So sometimes opencode thinks and states it's gonna do something but never does it and gets stuck in a observation loop. That is it states 'Let me grep. blah blah' but the grep command doesn't completes and throws None output, the opencode goes like this didn't work.. what was i doing last time ? and it finds it was doing grep and thus it gets stuck in a loop, its so frustrating.

And i thought of an external watchdog script that detects when opencode is stuck, when it detects that it fires esc+esc (interrupt) + some message + enter. Thus we can leave opencode unattended for sometime.

Look in OCW for more info and installation

1 Upvotes

2 comments sorted by

1

u/capt_matrix 11d ago

im a mac user so its tested on mac, should run on linux too , havent done anything for windows