Remix.run Logo
LaurensBER a day ago

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 system prompt and re-evaluates every SSE turn. If you’re using OpenCode at midnight you get a full prompt cache miss.

Okay, I can live with those.

# Compaction

> Want to sit for 10 minutes while the LLM server prefills the entire session with a new prompt prefixed to it, just to turn it into 5 bullet points that go at the top of a new session? Me neither. I get what they are going for, but I’ve not seen it work well. Neither compaction nor pruning is implemented well, and they interact poorly.

Is this an OpenCode specific issue? I've seen the same with Codex and Claude

# System Prompts

> The default system prompt is opinionated (fine) but it has shit opinions (not fine). It took me a while to figure out why my agent kept saying “Use ABSOLUTELY NO COMMENTS” when dispatching subagents.

Okay, so change it? Any LLM is opinionated, this system prompt enforces consistency across different models which seems reasonable.

nylonstrung a day ago | parent | next [-]

The bigger point is that the codebase is hopelessly bloated by vibe coded features at this point, mirroring the same problems with Claude Code. And stability, performance, memory use have all gotten terrible.

I liked Opencode a lot previously but there's no doubt it's not well-written software. Pi has fully replaced it for me and there are quite a few newer options that learned from Opencode and exercise more minimalism where it matters

JeremyNT 17 hours ago | parent | next [-]

I keep seeing these conceptual complaints about OpenCode but it's unreasonably effective, so it's difficult to justify any time spent in changing to something else.

It hardly matters that it's vibe coded and ugly if it works well... and it does (for me).

Saving a few CPU cycles and reducing RAM utilization on my local system isn't going to meaningfully improve anything in and of itself; the wall time is all bounded by the model or by the code it's invoking (i.e. compiling or running the test suite).

snapplebobapple a day ago | parent | prev | next [-]

Got a link? Pi is suitably as to make search engines questionable

embedding-shape a day ago | parent | next [-]

For the future, adding the related concepts/themes around hard to search for terms tend to do the trick. Instead of searching "go" for example, do "go programming language". Or instead of "pi", do "pi agent" or even "pi llm".

georgemcbay a day ago | parent [-]

While this is a generally useful suggestion you are giving, for Go in specific you can just use "golang".

All of the major search engines have understood that as a stand-in for "Go the programming language" for many years.

reddit_clone 17 hours ago | parent | next [-]

Yeah. That is a sore point.

It has overridden a 4000 year old strategy board game played by millions (mostly Asians).

dminik 17 hours ago | parent | prev [-]

"golang" is literally "Go language". Doesn't matter that it's one word.

dofm a day ago | parent | prev [-]

pi.dev

dofm a day ago | parent | prev | next [-]

I am on this trajectory too; opencode got me started but I tried to understand the way it is working and to do that I would normally read the source code, but the source code is really not fun.

trollbridge a day ago | parent [-]

This seems to be quite common. You start with OpenCode (assuming you're someone who skips all the Claude Code hype); then you start thirsting for more, and switch to oh-my-pi.

I generally view the kind of code in projects like OpenCode to be the same as binary machine code, and the harness that works on it is the compiler. The source code is the prompts (I guess), except we live in a weird state now we use the existing machine code + more prompts to make even more machine code.

schmorptron a day ago | parent [-]

Yeah, this has been my progression as well. Maybe next it'll be just using plain pi when you figured out exactly what you want from omp and what you don't

vdomi a day ago | parent | next [-]

I like how browser and websearch is handled in omp. But I only like these two features, it might be time for me to actually spend some time with pi

samplifier 19 hours ago | parent | prev [-]

No one here started with Aider? Or even text-generation-webui? Or SillyTavern? Or were they too pseudo-agentic? :)

alightsoul a day ago | parent | prev | next [-]

Can you name a few? I'm looking for alternatives

polski-g a day ago | parent | next [-]

Pi or Dirge

dominotw a day ago | parent | prev | next [-]

write your own using pi.

cmrdporcupine a day ago | parent | prev [-]

OpenAI's Codex tool is not limited to only calling their models. You can create a profile that uses any OpenAI API compatible endpoint.

It's written in Rust. It seems to perform well. It also seems (from my poking around in it) on the whole well and deliberately written. It doesn't consume memory like a mf'er like Claude Code. It doesn't sit and chew background CPU like I've seen opencode.

I suspect it will accumulate more specific-to-OpenAI-isms over time though.

OleksandrC a day ago | parent | prev [-]

[dead]

k-langton a day ago | parent | prev | next [-]

Hey! I work on OpenCode, so thank you for this measured reply ;)

Just wanted to add a few things:

- We actually don't do tool-call pruning any more. But compaction is a necessary evil for the time being. There's only so much context window, and if you wish to keep working on the same task for a long time, the model needs to summarize its current progress so it can continue without hitting its token ceiling.

- With V2 (in beta atm), we have a new system for handling changing system instructions (AGENTS.md files, available skills, etc.) that avoids cache misses at all costs, while still giving the robot the newest information. I recorded a little video about it here:

https://x.com/kitlangton/status/2075749116760457346/video/1

sgallant 21 hours ago | parent | next [-]

Just checked out the video...you, my friend, could be a professional voice actor (assuming that job still exists in the future).

vitamark a day ago | parent | prev | next [-]

Can you shed some light on what's the deal with the new interface (web/desktop)?

I updated one of my opencode containers today and had to downgrade it back because:

1. Worktree/workspace support is gone altogether. No way for agent to work in parallel on different things safely except prompting it directly to create a worktree.

2. Seeing multiple sessions properly now requires opening tabs for those?

3. In general, switching between several projects/sessions/whatever stopped working, and command palette is hotkey-only.

Issues about the new design just sit in an endless unsolved pile on GitHub which seems hopeless. And an agressive stale bot is not helping with that.

I came to OpenCode because it seemed hackable and simple, and at this point it seems like a "move fast break a lot" project that you got to live with.

(rant over, sorry if this is addressed to the wrong person, just needed to vent a bit)

jayair a day ago | parent [-]

Yeah it's a big change.

Workspace support is being worked on, it was half-implemented before, so we are taking a proper pass at it now.

For switching between sessions, can you tell me about your workflow from before? Because a tab can hold a session from any project. Are you saying that opening up a tab is too heavy of an action?

GitHub issues though has been a problem from us, we deal with a ton of noise/spam.

vitamark an hour ago | parent [-]

As for switching between sessions — it's the hierarchy that's lost on tabs.

in 1.17 I get basically a three-level hierarchy: project -> workspace -> session

I could say I rarely use more than one session per workspace (not including subagents), but switching between projects as totally separate contexts works good.

Tabs on the other hand are less organized, I can see them being fine for sessions in one project (although sidebar is more ergonomical on both desktop and mobile)

Keep in mind that this is coming from someone who has a live browser tab counter website: https://tabs.evtn.me/

steve_adams_86 a day ago | parent | prev [-]

Does V2 finally imminentize the eschaton? V1 has completely failed at this so far

k-langton 19 hours ago | parent [-]

I see what you did there ;P

nextaccountic a day ago | parent | prev | next [-]

> I feel that a better title for this article would be: "Some minor annoyances that, when fixed, would improve OpenCode"

Those are labeled as "annoying things"

Read also the "alarming things"

lynndotpy a day ago | parent | prev | next [-]

This article has several sections and you are commenting on things under the section titled "Annoying Things".

There is another section titled "Alarming Things", with a subsection titled "It’s Fucking Full of RCEs". (Those are RCEs other than those which simply derive from the issues pointed out in previous subsections).

a day ago | parent [-]
[deleted]
cpburns2009 a day ago | parent | prev | next [-]

>> > The default system prompt is opinionated (fine) but it has shit opinions (not fine). It took me a while to figure out why my agent kept saying “Use ABSOLUTELY NO COMMENTS” when dispatching subagents.

So that's why OpenCode likes to randomly remove my comments.

dinfinity 19 hours ago | parent [-]

Opinionated system prompts forcing this are awful. It's similar to putting "ALWAYS INDENT WITH TABS" in the system prompt, but worse, because "self-documenting code" is a convenient lie lazy developers like to propagate.

I have the following in my instructions, but I often need to remind agents of it because they follow the shitty system prompt instructions:

"ALWAYS include MANY inline code comments describing what blocks of code are supposed to be doing. Inline comments serve as inline specification, a parity check between the code and the specification, and are a means to _communicate_ with all future programmers, including yourself. Write Once, Read Many. The code needs to talk to whomever is looking at it in natural language."

disiplus a day ago | parent | prev | next [-]

Cache Misses are pretty bad, i have a locally running deepseek v4 flash, i have tuned it now to have 1100-1300 prefill. Its not great but properly useable. Imagine having a session with already 100k and half of it has to be prefilled it would be waiting minutes with worse numbers. And if you are paying by the token, for hosted models, you are wasting money.

brianjking a day ago | parent | prev | next [-]

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"

zyuiop a day ago | parent [-]

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

bel8 a day ago | parent | next [-]

The RCE they mention was fixed in December, 2025:

https://github.com/anomalyco/opencode/releases?page=21#relea...

ekidd a day ago | parent [-]

It is a pretty catastrophically dumb CVE, of the sort that makes me not want to allow OpenCode anywhere near any of my machines in the future. It was basically "RCE as a service", not some subtle bug.

Personally, I run pi-agent in a custom sandbox based on bwrap, with an internet proxy. This mostly limits the blast radius to one source tree and one git checkout. And I don't give it push/pull permission. Local models are fun in a "closely supervised but slightly clueless minion" sort of way.

bel8 a day ago | parent [-]

I too love and use pi agent.

But all of these agents have or had "dumb" security issues:

https://github.com/anthropics/claude-code/security/advisorie...

You probably know that since you run pi inside https://github.com/containers/bubblewrap.

ekidd a day ago | parent [-]

Those are Claude Code security issues? And Claude Code is a gigantic vibe-coded dumpster fire with more bugs than an ant hill?

pi-agent famously doesn't even try to provide a sandbox, so obviously it can't have sandbox security bugs!

I actually think that this is the right model: The agent should not have access to anything it doesn't actually need: User files outside the work tree (except for maybe some allow-listed dotfiles), network access, real credentials, etc. Lock it down tight, and reduce exposure on multiple parts of the "Lethal Trifecta".

troyvit a day ago | parent | prev | next [-]

There were 3,905 words above any mention of an RCE. Can you blame them?

daureg a day ago | parent [-]

there were only 110 words before it said “There are two parts to this post: annoying things and alarming things. The second part is longer.” But I agree it would be better with a table of content at the top (or on the side)

awinter-py a day ago | parent | prev [-]

I use nono.sh for sandboxing -- I think a lot of power users are using sandbox + YOLO mode because approval prompts slow them down

yes it's bad if the permission system is broken, but serious users have not trusted this stuff for a while, find the built-in permissions layer burdensome, and are already using a safety layer somewhere else

zyuiop a day ago | parent [-]

Which makes sense, but as long as the tool itself pretends to provide security features, the fact that these features don't work is a big problem, as it may provide a false sense of security to end users.

It'd be better if they had absolutely no permission enforcement and delegated it entirely to another program, as you say.

mrighele a day ago | parent | prev | next [-]

# 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 system prompt and re-evaluates every SSE turn. If you’re using OpenCode at midnight you get a full prompt cache miss.

I used opencode with deepseek v4 via openrouter during the weekend. Openrouter claims a cache hit rate of about 95%. Maybe it can be improved, but it doesn't seem broken.

I agree that it is bloated, and uses a lot of memory and cpu. But I don't remember seeing any bug during its usage, or at least not big enough to notice

trollbridge a day ago | parent [-]

DeepSeek has a phenomenal cacheing architecture that specifically can work with less-than-ideal clients like this and get cache hits anyway.

cevn a day ago | parent | prev | next [-]

I actually share that opinion of no comment from LLMs. I just dont want to read them. So as usual, an opinion is… an opinion.

naasking a day ago | parent [-]

Comments sometimes help the LLM think through a problem. They are particularly useful if you have thinking disabled, eg. it's not uncommon to run Qwen3.6 locally, but its thinking is extremely verbose, so it's fast if you disable thinking, but doing that will sometimes cause it to think a little in comments, and if you disable that too, then it will produce worse output.

Comments can always be stripped reliably later.

cevn a day ago | parent [-]

That is interesting, I had no idea comments were used in the process. I've only been using frontier models with maxed thinking, but this could be useful on the other end.

tomComb a day ago | parent | prev | next [-]

IMO, if you "put a quick note in AGENTS.md" then you should expect a cache miss.

I think that is reasonable and intuitive.

That was the first complaint I came across in the article and it made me question the level of indignation of the whole thing.

xg15 a day ago | parent | prev | next [-]

> I feel that a better title for this article would be: "Some minor annoyances that, when fixed, would improve OpenCode"

> If you don’t know what OpenCode is, imagine a boot stamping on a human face forever. The boot is made of TypeScript and the face is everything we have learned about security and systems software since the invention of the electronic computer in the 1940s.

Regardless if that's a good or bad take, I'd like titles on HN to reflect what the author wanted to say and not editorialized to what HN readers think the article should be saying.

versteegen a day ago | parent | prev | next [-]

I always run opencode with envvar `OPENCODE_DISABLE_AUTOCOMPACT=1` because I discover a new horrible bug in its autocompact every time I don't... including the config .json option to turn off autocompact not working.

Sad but not surprised to hear about all these other issues. I like opencode, it does plenty right but plenty wrong.

whythismatters a day ago | parent | prev | next [-]

When I looked into opencode a few months ago I was struck by the default system prompt which came across as messy and random, iirc it also contained a typo or two. It made me look elsewhere and I didn't look back.

Hizonner a day ago | parent | prev | next [-]

> > The default system prompt is opinionated (fine) but it has shit opinions (not fine). It took me a while to figure out why my agent kept saying “Use ABSOLUTELY NO COMMENTS” when dispatching subagents.

> Okay, so change it? Any LLM is opinionated, this system prompt enforces consistency across different models which seems reasonable.

OpenCode embeds scatters bad coding policy all over all of its inbuilt prompts, including tool instructions. The only way I've found to fix them is to edit the source code. And, yes, they're also huge and repetitive.

A framework's native prompts should include only information about how to interact with the framework itself.

verdverm a day ago | parent [-]

yet OpenCode is #1 harness per Artificial Analysis

https://artificialanalysis.ai/agents/coding-agents?coding-ag...

intothemild a day ago | parent | prev [-]

That's the thing. You can't change it. They do not accept PRs from what I've seen. Whilst it's open source it's only in name. There may be the odd PR accepted from outside the team. But very very rarely.

It's honestly embarrassing to call this open source.

Pi on the other hand, whilst they have their own unique issues with PRs, if you came to them with a genuine problem, or fix, they seem to accept it.

Now I point back to those issues you pointed out, all have PRs... Unmerged. Same with the infinite depth subagent calling.

wasabi991011 a day ago | parent [-]

Open source doesn't mean that it has to accept PRs. It has never meant that the code author's must accept community contributors.

OpenCode has an MIT license, which allows you to copy/fork the code and modify it how you see fit.

Please review the open source initiative's definition of open source: https://opensource.org/osd

chuckadams a day ago | parent | next [-]

SQLite famously doesn't accept PRs either, and it's public domain.

verdverm a day ago | parent | prev [-]

I pinged the OC devs to get someone else's PR merged to fix a slop artifact, they did indeed merge external PRs.

Like many popular Ai projects, they get 1000s of slop PRs. They are also working on a v2, so fixes to old code are much less likely to land now.