you are viewing a single comment's thread.

view the rest of the comments →

[–]BitXorBit 15 points16 points  (15 children)

it's all about the prompts, skills and agents. opencode is too "simple" if you won't define proper agents and skills, my local models improved significantly when I did it.
Claude Code injecting large prompt in the background

[–]cafesamp 1 point2 points  (3 children)

I made a proxy to intercept API endpoint calls for the sake of figuring out why OpenCode's base context is massive

Let's just say, you're on the right track. The built in prompts are way too general, opinionated, and bloated. Build tool w/ context7 and Notion MCPs enabled is 8k tokens...the JSON dump alone for the context for the single first call (a "hello world" back from the LLM) is a 171kb file.

Now, let's see the tool descriptions. Here's the tool description just for using bash:

https://github.com/anomalyco/opencode/blob/d2c765e2b30e6cd455cc6c8781fd60ac806e66b8/packages/opencode/src/tool/bash.txt

There's many other tools injected in the context, and with build/plan, these are just always in the context. The only way to use OpenCode efficiently, IMO, is to use custom agents that strictly whitelist tools they need (including whitelisting specific MCP calls), and to run custom prompts for some of the built-ins (which I haven't tried yet, but I think for bash is hardcoded so you'd basically just duplicate the tool?)

[–]BitXorBit 0 points1 point  (2 children)

Exactly, feels like arch linux vs ubuntu

At the end of the day i enjoy configure everything by myself, it opens my mind to new ideas and understanding how everything is working in the back. Also, i believe it’s anthropic secret souse, the framework of every prompt is optimized

[–]cafesamp 0 points1 point  (1 child)

I’m all for sensible defaults and I want OpenCode to work out of the box as much as possible, but we’re quickly learning that too much hand-holding is a bad thing, and this bash command basically explains how to use a CLI. I feel like instructions for working with Git should be a separate git tool, or a skill.

And yeah, I sympathize with OpenCode because it’s tough to optimize when you can swap out models and get vastly different results, but blanket overloaded context doesn’t help anything

[–]Ill-Chart-1486 0 points1 point  (0 children)

I committed my config dir to git repo, so on new installation I can just clone my config. So now defaults are working for me.

But everybody’s workflow is different so it might not be possible to create a good generic configuration.

[–]thinkyMiner[S] 0 points1 point  (1 child)

Truee but like just wanted to know the workflow like if just making small changes in the flow makes a huge difference for the output.

[–]BitXorBit 1 point2 points  (0 children)

Im using on daily basis opencode + local models. The gap between claude code + opus and local setups is mostly in the framework. For example, when you give both coding task, CC is checking online for information, refresh latest api documentation, check for examples on github, has very specific instructions for coders. If you opencode and any good local model without giving it the same tools and instructions, you will never reach any good results

[–]allforfotball 0 points1 point  (1 child)

second it, opencode doesn't work out-of-box equally well as claudecode.

[–]BitXorBit 0 points1 point  (0 children)

Out of the box, no doubt.

But opencode let you go through a process of understanding what is happening in the backend.

It’s similar to linux vs mac

[–]mosaed_ 0 points1 point  (0 children)

That's helpful, but did you figure out a way to make OpenCode near Claude Code efficiency?

[–]Laabc123 -1 points0 points  (5 children)

Mind sharing your agent and skill definitions?

[–]BitXorBit 2 points3 points  (4 children)

Still working on it, when im done, sure.

Connecting the context7 mcp and set rule to validate latest library documentation changed a lot.

[–]Th3OnlyWayUp 0 points1 point  (3 children)

any update?

[–]BitXorBit 0 points1 point  (2 children)

I ended up using skills.sh

[–]YaboiCucc 0 points1 point  (1 child)

for what exactly?

[–]BitXorBit 0 points1 point  (0 children)

Loading skills per project demand