Live data from Hacker News

Annoying and alarming things about OpenCode

wren.wtf

61–70 of 309 posts

Re: Annoying and alarming things about OpenCode

#61
post #30

About the caching things. This is a flaw in the backend, not in the Frontend. If the backend is only relying on prefix cache you need to look for more fine grained cache solutions like HiCache or Lmcache. If your backend discards the whole cache because of one date is changed, you really can’t blame it on the Frontend. It is an implementation detail that you push to the wrong side.

Prefix caching is inherent in how global softmax attention works. Modifying the prefix invalidates the suffix because the suffix's cached KV projections are a function of the hidden state after the model has evaluated the prefix.

There have been some attempts to approximately stitch KV blocks without full re-evaluation (see: CacheBlend on arxiv), but the results aren't promising.

You mentioned HiCache: as far as I can tell this is a prefix tree cache that efficiently shares prefixes across related histories. If you change the prefix, everything after the change still misses the cache and needs to be prefilled again.

Re: Annoying and alarming things about OpenCode

#62
post #10

Earlier quoted context omitted.

You could easily just use Pi or even a Codex fork to avoid Opencode as a harness and still pay zero dollars.

Can't get those generous free quotas from opencode with that.

hmm you can.

https://opencode.ai/zen/v1/models

https://opencode.ai/zen/go/v1/models

Re: Annoying and alarming things about OpenCode

#63
post #25
post #9

I switched from OpenCode to Pi and there was a big improvement in terms of tool calling performance and I find the experience less buggy. OpenCode has also seemed to have disappeared from https://openrouter.ai/apps/category/coding

How you deal with LSP? One of the best things in OpenCode is LSP integration.

Oh My Pi has it. I'm a big OMP shill right now. Seems not very popular, but it has the stability of Pi with the features Opencode (and more I think; OMP has web browsing and a more advanced edit system too). OMP often outperforms Claude Code and Codex for me.

Re: Annoying and alarming things about OpenCode

#65

If OpenCode is so terrible it wouldn't be the base for many of the fortune 500's internal cli coding agents, Meta included

> If OpenCode is so terrible it wouldn't be the base

Ignoring the appeal to authority inherent to this kind of statement, it's ignoring another implication. Large companies can afford to maintain a fork. Using the latest release of OpenCode day to day is a different proposition than serving as some corporate developmental branch "base", as shorthand for all sorts of changes/usage.

Re: Annoying and alarming things about OpenCode

#66
post #30

About the caching things. This is a flaw in the backend, not in the Frontend. If the backend is only relying on prefix cache you need to look for more fine grained cache solutions like HiCache or Lmcache. If your backend discards the whole cache because of one date is changed, you really can’t blame it on the Frontend. It is an implementation detail that you push to the wrong side.

That's not how it works. While there are some research papers looking into using chunks of kv cache while discarding others, those involve architecture changes in the models themselves. HiCache / LMcache (used in sglang/vllm) are ways of optimising the juggling of kv cache, but IIUC it still needs to be token perfect atm.

Re: Annoying and alarming things about OpenCode

#67

Earlier quoted context omitted.

> How you deal with LSP? One of the best things in OpenCode is LSP integration. I would love to learn how LSP helps you. I did various basic evals with LSP and I did not find it to improve the agent performance at all. Maybe on newer models this gets better because they are now RLing with LSP in the context, but at least in the past having a commit hook that runs lints and typecheck at the end, is more token efficien…

lsp integration isn't for checks like that. It's for using lsp to do things like symbol renames. It's cheaper to call an LSP server to do those kind of simple refactors than to spend tokens on the model doing it. It can also use LSP to build context without having to grep around a ton. You don't have to grep and hten pull lines and make guesses for a function. You just ask the LSP for it. How helpful all that is is h…

> It's for using lsp to do things like symbol renames. It's cheaper to call an LSP server to do those kind of simple refactors than to spend tokens on the model doing it.

Is OpenCode pushing the LLM into doing these refactors via LSP? I found that making these refactors with ast-grep is quite efficient.

> It can also use LSP to build context without having to grep around a ton. You don't have to grep and hten pull lines and make guesses for a function. You just ask the LSP for it.

I guess I was not particularly successful with having the agent actually do that. I think what fff is attempting to do (with fuzzy expansion of slightly inaccurate greps) results in better results to me, but even that is debatable.

To be fair, we do not have evals for this today, but we're generally looking into token efficiency and how likely models are at using tools the right way, and we did not find a ton of evidence of LSP helping, even for finding data.

But I would love to see some sessions from people where they have success with LSP data for either refactoring or looking up, because this would be super useful to better understand out blind spots.

Re: Annoying and alarming things about OpenCode

#68

I feel that a better title for this article would be: "Some minor annoyances that, when fixed, would improve OpenCode" # Prompt Cache Misses > It globs your filesystem and re-reads AGENTS.md (injected in turn-0 system prompt) on every SSE turn. If you put a quick note in AGENTS.md to be read in the next session, you immediately force a full re-evaluation. > Personal favourite: it puts the current date in the turn-0 s…

Definitely agree on the title. Also could have worked as 'Some minor annoyances that, when fixed, would improve OpenCode. Also, I don't like AI"

Did both of you intentionally skip the part of the article about the critical security issues?

Re: Annoying and alarming things about OpenCode

#69
post #21

Earlier quoted context omitted.

yeah I noticed it missing on the openrouter leaderboard -- very interested to know what that's about

probably about their own model routing service zen?

I can imagine the builtin router stealing traffic, but not removing opencode from the ranking completely?

Like the 'top apps' in my private openrouter.ai activity usage is opencode with 55.1M tokens

The bottom of the public apps leaderboard is 'kern agent' with 150 million tokens

if there are 2 other people like me, opencode should be on here somewhere

(edit: user shiggity points out https://github.com/anomalyco/opencode/issues/11926#issuecomm..., they asked to be removed from the ranking)

Post reply on HN