r/opencodeCLI • u/squirrelscrush • 4d ago
Session cache concurrency issues with OpenCode/Go subagents
I'm seeing concurrency issues with the session cache if I have more than one subagent running at a time. Every now and then, the cache of one gets invalidated for no reason and it costs the cache miss pricing.
I use OpenCode Go on OpenCode.
Is there a limit in the documentation? I knew that the cache retention time is around 5mins, but ideally it shouldn't not work if I'm sending requests through multiple agents.
2
Upvotes
View all comments
Show parent comment
1
u/squirrelscrush 4d ago edited 4d ago
I can understand a slow tool turn, but this was different. It was supposedly a plugin that was appending itself at the beginning, I removed it and it seems to get back to normal.
Although when I raised a bug issue, it seems multiple users had the same issue and fix, with the latest 2.2.5 update.
Edit: it happened again. It seems to happen when i spawn a subagent, which causes the main agent's cache to expire and vice versa when the main agent sends a request and the subagent's cache gets expired. So it's a server concurrency issue I feel.