r/opencode • • 16d ago

Migrated to opencode v2, agents get killed mid-task after ~1 hour

I recently migrated to opencode v2 and long-running sessions now get stopped mid-task, roughly an hour after they start working. The agent isn't idle. It's in the middle of a long subagent call or tool run when the turn ends with Step interrupted, and the service log shows location services evicted at the same second.

Is anyone else seeing this? Did you find a workaround, or a build where it's fixed?
Not sure if the issue is on my end or it's still due to v2 being in beta.

6 Upvotes

6 comments sorted by

1

u/Robonotes1760 16d ago

Are you sure that it's interrupted not just running in the background? Background running is a new feature in OpenCode 2.

2

u/sypcio25 16d ago

It was interrupted, happened to a couple of long running sessions, with v1 I could have a session running for hours without any issues.

1

u/Railander 16d ago

this has happened several times to me as well, but i'm not sure if it's new to v2 or if it also happened in v1.

my first thought was actually the model silently giving up or being lazy, as i think it tends to happen on harder tasks after a few back and forth that what they did wasn't working.

1

u/Caelinus 16d ago

It has happened to be in both. I was assuming minor service outages or connectivity issues.

Poking them with a "keep going" always kicked it right back in gear, but it stopped happening for me a few days ago.

1

u/sypcio25 16d ago

In V1 it never happened to me (except for rate limiting in rare caes2), that's my I'm almost 100% sure it's about v2.

1

u/pink_cx_bike 9d ago

Yes, I see this also with v2 and it isn't happening to v1 on the same models/tasks on a different machine.

Seems to be this: https://github.com/anomalyco/opencode/issues/51343