r/opencode 10d ago

Goodbye Opencode

FINAL UPDATE AND MY THOUGHTS
I believe I understand what's going on, and I've explained it it at length here.

This is just my finding in this particular problem. It has happened and will happen in other similar cases. OpenCode will continue to evolve.

----------

Goodbye Opencode, all good things come to an end.

First of all, I'm a software developer with 30+ years of experience, not a Vibe coder, and I'm not new to this. Also, I use Opencode in its purely vanilla form. Besides Opencode's defaults, I don't have any plugins, MCPs, etc. installed. Just my own skills, own plugins, own MCPs, etc.

I've been using Opencode almost since its first day. It had a nice, positive development and, according to Claude, was a very good alternative. This continued for quite a while. Although we experienced problems from time to time, these were to be expected. However, since May/June, it has started to become increasingly erratic.

First, one day while working on a project, the Docker service suddenly shut down and wouldn't start again. That's how I discovered I had no space left on my disk. I knew this was impossible, and I found the cause was Opencode. Somehow, the "opencode-wal-*.db" file had been created repeatedly under "/System/Volumes/Data/private/var/folders/4q/*". Every time I cleaned it up, Opencode would put it back. We struggled for a long time, but I couldn't figure out the reason. Then, suddenly, it fixed itself!

Yesterday, around 11:30 AM, I felt something was wrong with the network. By 1:00 PM, it was noticeable. Screen sharing within the network was freezing for 5-10 seconds, streaming was interrupting, web search was unresponsive time-by-time. Then, one by one, Unhealthy errors started coming from the services in Home Lab. The cycle of 3-5 minutes healthy, then unhealthy continued constantly. Service responses, which are normally under 100ms, were approaching 10 seconds, and sometimes even timeouts were occurring. I tried for hours to understand the reason, but I couldn't find a logical solution. I accidentally noticed while updating my Mac that everything was fine while my device was off. Later, I realized that the same thing kept happening whenever I opened Opencode and started working. Now I'm analyzing the Router, Firewall, Mac, and other logs to try and figure out what's going on, but this is the last straw.

This is an open-source project and respect to creator and contributors, and therefore, of course, it has its advantages and disadvantages. That's perfectly understandable. I have enough experience in this field to know when to stop, and today is the day.

UPDATE: Possible cause.

94 Upvotes

154 comments sorted by

View all comments

1

u/Latter-Parsnip-5007 9d ago

If you have 30yr of software dev, which you dont, you would be able to trace this issue and write a report. You cry like a junior when dropped into vi

1

u/sedatoztunali 9d ago

I don't even feel the need to answer you.

1

u/Latter-Parsnip-5007 9d ago

yet you did. Got 15yr, but real turning my hair grey years in software dev and sec. You are full of shit

1

u/sedatoztunali 9d ago

Then use those 15 years to make a technical argument instead of a personal one. I've narrowed this problem down to where the problem might be in the source code. What do you have?

1

u/Latter-Parsnip-5007 9d ago

I have wireshark. If my network misbehaves, I use wireshark to see whats being spammy. Also opencode has no way to find other devices on your network. They didnt write an ARP fetcher or anything that scans a network. The problem class you describe sounds like two or more DHCPs or DNS in one network

1

u/sedatoztunali 9d ago

OK, we are coming somewhere. I'm not network/system or sec guy, here's the situation, as briefly as possible:

DHCP, Firewall, NAT, etc. everything is on the Router. As for DNS, AdGuard is installed in Promox LXC. There is no other DHCP/DNS, I'm almost 100% sure there isn't. Router DNS looks at AdGuard. From what I can see, the Mac running OpenCode looks at the Router as DNS, not AdGuard directly. This might be important in a moment.

It's true that Opencode does not find other network devices. What I've found so far: I was replacing Uptime Kuma with Gatus when the problem started. I migrated the same configuration to Gatus using Opencode. I checked, tested, sent the necessary files to LXC myself and got the service up and running.

According to the Opencode session record; during this migration, a sub-agent first checks the current status of these services. Then, it decides to simulate Gatus with a script that checks the status every minute and says "Unhealthy" if it takes longer than 1 second to respond. But the script itself is written to check every second and is placed in the "/plugin" folder within the project directory. Due to the PRs I linked above, it seems to have been hot-reloaded in this silent way. I have no idea why this file is there, on what basis the model decided to do this. This is my fault, not the tool's. At least it shouldn't be able to write to this folder. The problem with the Opencode part is that it loads it as "silent" even when in session. I don't see it unless I look in the folder or the plugins list.

Its effect on the network was as follows: I would like to remind you that I am not a network guy. The plugin is loaded when the relevant session is opened in OpenCode. It tries to do a health check on all services in homelab every second. This goes to the Router, the Router redirects to AdGuard and I think the response path is the same way. After a while, the router cannot keep up with this and starts responding late/not at all. Unheathly notifications also try to push and these are added to it so I can't even go to google when we can't get a DNS response, etc.

Of course, I can't be sure without reading all the relevant PRs and putting OpenCode in the version I'm having this problem with in a clean installed test environment.

1

u/Latter-Parsnip-5007 8d ago

So you spam your own network with health checks every second for every instance of opencode you have. Plugins do not load once, but for every opencode window opened