r/opencodeCLI

▲ 16 r/opencodeCLI+1 crossposts

OpenCode down?

Anyone have issues with open code? It was fine earlier and the Zen works, but when I switch to Go i get 400 errors 401 and 403 errors. Im using it through Hermes and have rotate keys and tried different models but I still get errors. Im at 0% Rolling usage, 55% weekly usage and 47% Monthly usage with monthly resetting in 22hours.

reddit.com
u/ObsidianNix — 2 hours ago

DeepSeek sudden error

Chat completion request error: Internal Server Error {"type":"error","error":{"type":"error","message":"Internal server error"}}

No idea why this is popping up now. It wasn't earlier.

Edit - Nevermind, apologies I didn't see any advice/faq for this. Seems OpenCode is just having issues.

reddit.com
u/Severe-Highlight-776 — 2 hours ago
▲ 1 r/opencodeCLI+2 crossposts

Hi everyone! Working on a bug-fixing and improvements branch in my ARPG game, for example refining the on-screen text/caption initialization system to eliminate overlapping. Now I'm adding the power of Opencode to the development process.

More than 40k lines of this codebase have been written entirely by hand, without AI, since 2019. Now I'm adding the power of AI (Codex and Opencode) to the development process, and it honestly speeds things up tremendously.

u/backtotheabyssgames — 4 hours ago
▲ 7 r/opencodeCLI+1 crossposts

Need suggestions on token usage/caching/optimization

So I have used claude code for an year and recently started using deepseek v4 pro using deepseek official api with claude code terminal app and have been quite impressed with the performance.

However I have noticed deepseek leaves a lot of gaps and misses in implementation when used in a large repo.

Reading through the review of opencode I tool subscription of open code go plan to use models like Minimax m3 and mimo 2.5 pro for code reviews.

I have used deepseek v4 pro using Go plan and i have noticed it burns through a lot more tokens when I used deepseek v4 pro (thinking effort max) than official api.

I want to know how are you guys optimising the token usage on go plan?

So for the context -

When I use official api I burn through $3 max per day but today on the go plan i burned my whole $12 in just 2 hours.

Not sure what would be the reason of such token burn. Need suggestions how can I check if caching or working and diagnose the issue.

reddit.com
u/Tasty-Specific-5224 — 8 hours ago

Why is Opencode pricing for DeepSeek V4 Pro is 4x market rate?

I discovered today that Opencode's pricing for DeepSeek V4 Pro appears to be about 4× higher than using the official DeepSeek API or OpenRouter.

https://preview.redd.it/5czoe4m2iebh1.png?width=3840&format=png&auto=webp&s=a3fb8d2284fd633828406f720bdffa4fd6dfcdb4

Here are the numbers (based on a real request in Opencode usage tab):

  • Input: 113,829 (I assume Cached + Non Cached Input)
  • Cache: 9,728 (Cached Input)
  • Output: 400 (Output + Reasoning)

References: Opencode Pricing (link), DeepSeek Pricing (link), Open Router Pricing (link)

Provider $ / M Input $ / M Cache $ / M Output Example Cost
Opencode $1.74 $0.145 $3.48 $0.1839*[1]
DeepSeek $0.435 $0.003625 $0.87 $0.0457
OpenRouter $0.435 $0.003625 $0.87 $0.0457

*[1]: Opencode actually registered higher price on usage for my Opencode GO subcription: $0.1993

Additionally, Opencode seems to have a very poor cache hit rate. In my testing, OpenRouter achieved a 91.5% cache hit rate, while Opencode was significantly lower (link).

One thing I did notice is that DeepSeek V4 Flash pricing appears to match the official DeepSeek API.

Context: I ran out of my usage much faster than expected today (my first time using DeepSeek V4 Pro through Opencode), so I decided to investigate.

I'd appreciate it if someone could sanity-check my calculations. I genuinely hope I've misunderstood something.

reddit.com
u/eyueldk — 13 hours ago
▲ 7 r/opencodeCLI+1 crossposts

Please help

Stuck in this loop. Only with MiMo-v2.5 via OpenRouter. Tried uninstalling using brew --force --zap, no luck.

u/mangonerdy — 9 hours ago

Hilarious experience with opencode + kimi2.7

I asked the fella to take a screenshot using chrome mcp

u/PracticalAd864 — 11 hours ago
▲ 272 r/opencodeCLI+1 crossposts

8 hours of work during a flight with a local LLM

Nothing very complicated, but just managed to do 8 hours of work while flying using OpenCode and Qwen 3.6.

This was the first time I actually do a long session of code using a local LLM (not tests under 1 hour).

Honestly, no time wasted and was completely satisfied. Though there was no complex work. The work mainly consisted of:
- Small edits
- Code comments
- Specs update
- Brainstorming and working on new features (spec level)

So nothing like « wow this replaces frontier models ». But more like « wow, it can actually understand the entire code base, update specs, and brainstorm really good feature ideas. if the internet is out, I can actually do some work with AI »

u/HamzaJdn — 21 hours ago

Question about ds v4 flash

okay so is it just me, but recently Deepseek V4 flash free has been more Unreliable? like slower outputs, and more chances to get errors, atleast for me, it worked perfectly in may but now it's just worse sometimes.

reddit.com
u/Ok_Visit_8734 — 9 hours ago
▲ 19 r/opencodeCLI+10 crossposts

I built Curion, a librarian-like memory agent for AI agents

I’ve been working on Curion, a memory system for AI agents built around a simple idea:

The main agent should not have to manage memory manually.

Most AI agents are useful inside a single session, but they still lose important context between sessions. Project decisions, implementation history, constraints, unresolved tasks, and previous reasoning often disappear unless I manually write long handoff notes.

At first, the obvious solution seems to be giving the agent memory tools: save, search, update, delete, edit.

But that creates a second problem.

If the main agent has to manage memory by itself, it can easily receive too many raw memories. Some are relevant, some are stale, some are only partially related, and some may conflict with newer information. The agent then has to spend context and attention deciding what matters.

That creates context bloat.

Curion takes a different approach.

I think of Curion as a librarian for AI agents.

A good librarian does not just throw every possibly related book at you. They understand the question, know how information is organized, filter what matters, notice conflicts, ask clarifying questions when needed, and return the most useful context.

That is what Curion is meant to do for agent memory.

The main agent only needs to say:

“I want to remember this.”

or

“I need to recall something about this.”

Curion handles the rest.

When saving memory, Curion can decide how information should be stored, whether it relates to existing records, whether something should be updated, and whether a conflict requires clarification.

When recalling memory, Curion does not just dump raw search results into the agent’s context. It retrieves relevant records, evaluates what is useful for the current task, synthesizes the context, and clearly says when nothing relevant was found.

The analogy I use is human memory. When we want to remember something, we do not consciously search through billions of memories. We ask for what we need, and the relevant memory appears automatically beneath the surface.

Curion is built around that same interface idea for AI agents.

It is project-first: Curion focuses on the project the agent is currently working in. It can also use cross-project recall when information from another project is actually relevant.

Curion is not just a save/search tool. It is a collaborative memory layer: a specialized memory librarian that helps agents remember responsibly, reduces context bloat, and gives the main agent only the context it actually needs.

GitHub: https://github.com/geanatz/curion

NPM: https://www.npmjs.com/package/@geanatz/curion

Portfolio: https://geanatz.com

u/geanatz — 1 day ago

Magic Compact: Replacing OpenCode's Terrible Compaction Algorithm

Back in February, I was reverse engineering Claude Code's source code from the minified JS bundles shipped on NPM. Over a series of turns, we had progressively built up a map of the codebase: what symbols meant, what different functions did under the hood, the main conversation loop, reverse-engineered Ink TUI modules, permission system, etc.

Then the context got filled up, OpenCode's compaction kicks in, and the entire conversation was compacted. All tool calls, all file reads and writes, all the decisions we made and secrets we uncovered gets replaced with a single summary blob generated from OpenCode's compaction prompt.

Of course, I had my agent constantly document its findings and recreate source files whenever possible, but that wasn't enough. After compaction, the agent woke up with basically no memory of the codebase at all. The quality fell off a cliff. All symbol mappings, structural inferences, module separations, hours of untangling minified garbage, all flattened into a generic template that captured maybe 10% of what mattered. It started re-reading the same minified files, re-deriving the same mappings we'd already worked out, undoing everything.

Thus, I decided to build a better replacement for OpenCode's built-in compaction system.

Comparison

The core idea was simple: standard compaction destroys information because it tries to summarize the entire conversation at once into a single Markdown summary. But what if you kept the conversation structure intact and only compressed the parts that actually needed it?

That's what Magic Compact does. It preserves every user message, replaces old assistant turns with lean summaries, and strips out large tool I/O into a cache while keeping the tool calls themselves visible. The conversation reads like the original, just condensed. Same flow, same decisions, same memory.

The difference in agent quality post-compaction is night and day. Per-turn summaries preserve the thought process and decisions for each turn, so the agent retains its working memory instead of waking up blind. It knows what files it explored, why it made certain choices, what the user actually asked for. Pruned tool calls means maximum savings, and past results can be reread from the cache at any time.

And since compaction is basically lossless in quality, you can run it way more aggressively than built-in compaction. I run /magic-compact constantly. Whenever I'm implementing adjacent features, I would compress after each feature and work on the next. If I'm working on a multi-phase plan, I would compact after each major phase. If I'm mid-implementation, I can pass an argument to keep the last few turns and only prune earlier ones.

In addition to lossless compression for long conversations, Magic Compact also helps me make my coding plan last at least 2-3x as long. For anyone on coding plans, this is a big deal. I've probably saved hundreds of billions of cached read tokens and thousands of dollars in billed token costs, letting me code 2 or 3x as much than before using the cheapest plans from Z.ai and OpenAI.

I've been using Magic Compact daily since March and it's become an integral part of my workflow, and today I've decided to open source it to share with the community.

UI

Install it now with:

opencode plugin magic-compact --global

Run /magic-compact [N] to compact, where N is the number of recent assistant turns to keep. If not provided, by default N = 0. Run /magic-stats to see token and accumulated cache read savings for the current conversation.

Magic Compact is also open source, fully open to contributions and feedback: https://github.com/aerovato/magic-compact

PS: You may have also heard of another plugin called OpenCode DCP; while DCP asks the model to periodically summarize conversations via distracting prompt injections which results in constant cache churn, Magic Compact takes a different approach: comprehensive compacting and pruning of the entire conversation on your command.

Compared to DCP, Magic Compact is much more cache and token friendly with its aggressive summarization while being better at preserving quality. Magic Compact also doesn't periodically inject notices into the conversation, forcing the agent to compact and invalidate caches, so your agent stays 100% on task. You can use Magic Compact as a superior replacement over DCP.

reddit.com
u/chocolateUI — 1 day ago

What is the provider of GLM in opencode GO?

I'm getting way more broken or repeat text from GLM 5.2 in Opencode GO than from official api. Did anyone notice the same?

reddit.com
u/duhd1993 — 1 day ago
▲ 13 r/opencodeCLI+3 crossposts

I built an MCP gateway that lets models use Microsoft Copilot for vision and documents

I built a small MCP project and would love feedback from people using OpenCode, DeepSeek, GLM/Z.ai models, or other coding agents.

https://github.com/yurilopes/Copilot-Tools-Gateway

The basic idea is: keep your main coding model as the main agent, but let it call Microsoft Copilot as an auxiliary tool when it needs capabilities the model/tooling may not have, like vision, screenshot understanding, image generation, or document/file-assisted questions.

This is especially useful with models like GLM-5.2 or DeepSeek, where the coding/reasoning may be strong, but the surrounding tool stack may not always expose vision or document understanding.

The gateway exposes Copilot through MCP tools, so an agent like OpenCode can call things like chat, image analysis, image generation, and file-assisted questions using your own local Microsoft account session.

It is unofficial and not affiliated with Microsoft.

I would really appreciate people testing it and telling me what feels good, what feels awkward, what breaks, and what would make it more useful for real agentic coding workflows.

u/QuietPsychonaut — 20 hours ago
▲ 50 r/opencodeCLI+1 crossposts

PSA: opencode invalidates KV cache globally every midnight (cost + TTFT hit)

I have no idea why this wasn't fixed a long time ago, but Opencode puts the current local date in the env, which sits at the very start of the prompt, and it's updated live on every new submit. This means every session / subagent / etc. sees a full cache miss on the next prompt submitted on a new day. This blows through tokens, costs more (uncached input tokens are ~10x vs. cached), and kills performance and TTFT on locally served models. This has literal global implications and impacts the entire opencode userbase.

There's a few issues and PR's filed on this, but none have been accepted. No idea why it's gone so long, but folks are wasting money and time, so I did a simpler PR that just moves the date out of env and puts the current date/time/tz stamp as a system reminder (alongside the plan/build message) at the very bottom of the prompt.

For those of you not wanting to rebuild Opencode to apply the PR, I've provided a plugin below. This will trigger a cache miss of all sessions (due to removing the date from env), but it's a 1-time hit similar to an agents update.

~/.config/opencode/plugins/time-context.js

export default {
  id: "time-context",
  server() {
    return {
      'experimental.chat.system.transform': async (_input, { system }) => {
        system[0] = system[0].replace(/\n\s*Today's date: .+/, '')
      },
      'experimental.chat.messages.transform': async (_input, output) => {
        const last = output.messages.findLast(m => m.info.role === 'user')
        if (!last) return
        const part = last.parts.find(p => p.type === 'text' && !p.synthetic)
        if (!part || part.text.includes('<system-reminder>')) return
        part.text += `\n\n<system-reminder>${new Date(last.info.time.created).toString()}</system-reminder>`
      },
    }
  }
}
u/malventano — 1 day ago
▲ 2 r/opencodeCLI+1 crossposts

Anyone using Cline Pass as their main coding subscription? How are the limits?

Cline Pass is still very new, so I'm curious about real-world experiences.

If you've been using it for coding, how has it been so far?

Have you hit the 5-hour, weekly, or monthly limits?

Which models are you using the most?

Do some models consume the quota much faster than others?

Roughly how much coding can you do before reaching the limits?

Would you recommend it over services like OpenCode Go?

I'd really appreciate hearing about your experience before I decide whether to subscribe.

reddit.com
u/Illustrious_Lab5811 — 1 day ago
▲ 31 r/opencodeCLI+10 crossposts

SeekYou, unified host intelligence across 15 sources

SeekYou – unified host intelligence across 15 sources, runs free on Cloudflare.
- Built a tool that takes any IP, domain, or ASN and queries 15 sources in parallel: open ports, CVEs, BGP, RDAP, cert history, passive DNS, 5 threat feeds, exposed buckets, Wayback snapshots — all in one report.
- 4-layer parallel execution (total time ≈ slowest source, not sum of all).
- KV caching per source, circuit breakers, per-IP rate limiting.
- Typed diff engine — get alerted when ports open, CVEs appear, or certs expire on monitored hosts.
- Runs entirely on Cloudflare free tier (~5k lookups/day).
Source: https://github.com/Teycir/SeekYou (https://github.com/Teycir/SeekYou)

u/tcoder7 — 1 day ago
▲ 1 r/opencodeCLI+1 crossposts

New to vibecoding, needing some help

I've recently started experimenting with using AI to actually make stuff instead of using it like google search, i manage a repair shop and i figured i could use AI to automate many parts of the business and also create helpful tools for my technicians.

I don't know anything about programming/coding, but want to learn useful concepts, tips and workflows in order to manage my agents better.

Right now the only subscription i have is Opencode Go, and I'm using the desktop app for Linux with the GUI (an unpopular opinion i guess because most people use the CLI)

My questions for any of you that want to help are the following:

  1. While I'm fine with the Opencode GUI, i want to know if there is a better option that is more user friendly for me as someone who is new to this, that is available for Linux (Fedora) and that doesn't trade off being user friendly for a lack of advanced features.

  2. I'm pretty much using defaults for everything, so i want to know about some useful plugins/extensions that actually make a difference in daily use and user experience.

  3. I've seen that most people agree that the best workflow to manage the Go limits efficiently is using a big model like GLM 5.2 for planning, and small models like DSV4-Flash or Mimo V2.5 for execution, I've been applying that and so far it's working pretty good, but i want to know if any of you use the other models and what are they best at, also if you combine Go with another Subscription or provider, which one seems to be the best low-cost combo? Right now I've been using Go + 10$ from Neuralwatt to get cheaper prices for GLM 5.2 so I don't hit my limits on Go, I'm considering the 20$ sub from Neuralwatt but if there's anything better I'm open to it.

  4. I'm struggling to think about what exactly do i want to build with these tools, since i don't know how far they can get, given that I'm not someone with enough knowledge to guide them in order to make the most of them, so i want to know if any of you started like me, what did you start of with that you could tell it was making your life, business or daily life easier? Right now it feels like i have a lot of power in my hands but can't figure out how to use it because I'm overwhelmed by the amount of possibilities i have and don't know where to start because i also don't know how far i can go.

Sorry for the wall of text, i would gladly appreciate it if any of you actually takes the time to help me with this journey.

reddit.com
u/Flinpleis — 1 day ago

Do not buy the Alibaba Token Plan

So I decided to give the $30 plan a try and immediately regret it.

This is after just a single prompt that used 12% context using GLM 5.2.

Chinese providers are more expensive now? lol?

https://preview.redd.it/hbyvcwo7y9bh1.png?width=1362&format=png&auto=webp&s=7bc21c5abe515d40df465a02c3268eb0df99e68b

https://preview.redd.it/pa91si9cy9bh1.png?width=476&format=png&auto=webp&s=5765119f082931da63ebca9c8f6c32eea1b255f2

reddit.com
u/ryudice — 1 day ago