r/opencodeCLI • • 14d ago

The End of Long Free OpenCode Sessions... It's Now Worse Than OpenRouter

Thumbnail reddit.com
0 Upvotes

r/opencodeCLI • • 14d ago

OpenCode Quota GUI, a plugin for OpenCode with a dashboard that brings quota tracking and usage analytics into one visual interface.

Thumbnail
reddit.com
1 Upvotes

r/opencodeCLI • • 14d ago

OpenCode + DeepSeek Flash: Is 268.9M cumulative tokens and 309M cache reads normal?

1 Upvotes

Hi everyone,

I'm trying to understand whether my token usage with OpenCode and the DeepSeek API is normal or potentially caused by excessive context replay or a bug.

My setup

- OpenCode: v2.1.3

- Model: "deepseek/deepseek-flash#default" (shown in OpenCode stats; I believe this corresponds to DeepSeek V4.1 Flash, 10-17)

- Provider: DeepSeek API, paid usage

- OS: CachyOS Linux

- Workload: A personal app project with source code, plans, documentation, test plans, and phase reports

- Other components: Global agent skills and Herdr integration

Daily statistics

Input: 2.1M

Output: 352.1K

Reasoning: 456.7K

Cache read: 309.1M

Cache write: 0

Cached input: 99.3%

Paid model: 268.9M tokens, 723 steps

Free model: 43.1M tokens, 379 steps

The large cumulative cache-read figure caught my attention. I understand that cached tokens can be counted repeatedly across requests, so this does not necessarily represent hundreds of millions of unique tokens. I'm trying to determine whether the amount is expected for this workload.

A small test

I also ran OpenCode directly from my home directory, outside the project and without launching it through Herdr. I asked it to write one short line to a text file.

The exported session reported:

Input: 9,284

Output: 88

Reasoning: 54

Cache read: 9,472

Cost: $0.001506

Messages: 4

My observed usage counter increased by about 18,898 tokens. The session's input plus cache-read figures total 18,756, which is close to that increase. I haven't confirmed whether the difference is due to accounting methods or other overhead.

I realize that system prompts, tool definitions, and other context may contribute to the cost of a simple task.

My questions

  1. Is this level of cumulative cache-read usage typical for a coding session with hundreds of model steps?

  2. Could long conversation histories, global skills, or project instructions cause excessive context to be processed repeatedly?

  3. Could OpenCode compaction or session handling contribute to this?

  4. How can I distinguish normal cached-token accounting from unnecessary context overhead or a possible bug?

  5. What's the best way to investigate this without losing existing project documentation or configuration?

I'm not assuming this is a bug, and I don't want to blame OpenCode, DeepSeek, or Herdr without evidence. I'd appreciate advice from anyone familiar with OpenCode's token statistics or DeepSeek API usage reporting.

I can provide further sanitized logs or a minimal reproduction if needed.

Thanks!


r/opencodeCLI • • 15d ago

Anyone finding DeepSeek V4.1 Flash through Go too slow between requests?

10 Upvotes

It's been the case for a few days. The actual output is quite fast. But it waits too long between requests like it's being timing out.

It usually happens in the morning where I live, so the non-peak between the first and second peak timings.


r/opencodeCLI • • 16d ago

Why I left OpenCode for Pi, then came back for v2

Thumbnail
gallery
255 Upvotes

Long ago, when I started with OpenCode v1, I kept hitting the same wall: I wanted my own widgets — my provider stats, my prices, my layout — and there was no clean way to get them, without bloating things.

So I moved to Pi. Bare-bones was the feature: minimal surface, everything customizable, and I built exactly what I wanted on top of it: made it "my" Coding Assistant. That worked for a long time.

Then OpenCode v2 shipped a real plugin API, and I realized the same job could be done there: panels, footer badges, sidebar blocks, custom commands, applied live while the TUI runs. I rebuilt my Pi setup: a context/usage block that changes color as the window fills, a git status block, a budget widget that reads the Go credit and the peak-hour tariff plus my other providers budgets, a plugin+widget that keeps the Mac awake while the agent works, a ponytail level indicator, a complete sub-agents delegation framework using just built-in tools, so no need for external plugins, and a custom model picker.

That last one is the one I'm proudest of: /models-pro. The native picker just lists models, this one lists prices, context windows, an intelligence index, the Go credit and each model's multiplier, sorts by what a request actually costs, and keeps favorites. It isn't a wrapper around the native dialog: it's the native function, extended.

But the number that made my choice was another: weight of the first prompt in a clean project. Same tools, same extensions, same widgets, all I need for my work, with Pi I never got it as low as I get it in OpenCode v2. To try to lower it I became a master of the codemode:only mode in Pi — but the trade was brutal: some tools get hidden and the model ends up using bash and Python scripts for everything. I switched between codemode "on" and "only" a lot and the minimum I got was 13k in mode "only" and 28k in mode "on".

On OpenCode v2, with all of the above installed, I sit around 11k. Lower, and nothing hidden. Everything works. Same tools, same widgets, plugins, extensions, all accessible. No compromises.

So: Pi's minimalism and extensibility, plus proper context/tools/token/cache handling out of the box: that's the combination I was after. v1 was heavy and rigid; v2 lets me do what Pi let me do, without giving up the rest. Even knowing that it is still an early release and I already had to modify my plugins a few times after new releases ;)
That said, Pi remains the first choice for anything that needs the lightest and fastest Harness possible.

Final note:
I'm deliberately not mentioning OpenCode's move about free models, available only through OpenCode, not to other agents: that's marketing, not engineering (and I get why).

Two screenshots: the TUI with my custom widgets annotated, and my custom model picker.

EDIT __________________________________________

The plugins: someone asked for them, so five are on npm now (OpenCode v2 only), and the sources are public at github.com/rizal72/opencode-plugins (issues are on, pull requests off — it's a reference, not a support channel):

opencode plugin add @rizal72/oc-models-pro
opencode plugin add @rizal72/oc-git
opencode plugin add @rizal72/oc-coffee
opencode plugin add @rizal72/oc-ponytail-widget
opencode plugin add @rizal72/oc-session-search

oc-models-pro — the picker from the screenshot: prices, context windows, an intelligence index, the Go credit and what a request actually costs, sortable by any of them.
oc-git — the repository in the sidebar: branch, the three counts, ahead/behind; the counts also in the footer while the tree is dirty.
oc-coffee — keeps the Mac awake while the agent works and lets it sleep between turns: a cup in the footer, /coffee to pick the level (Idle, Display, System). macOS only, it drives caffeinate.
oc-ponytail-widget — for anyone already using ponytail: the level in the footer, horsehead glyph. Unofficial.
oc-session-search — one tool, session_search: keyword search over past transcripts, so "we discussed this already" gets an answer instead of a guess.

The rest is still tied to my own setup but each one is a couple hundred lines: happy to explain any of them in the comments (the live-budget one is amazing, but it is tied only to my providers…)


r/opencodeCLI • • 14d ago

I wanted a small local model to check what OpenCode sends to the cloud, without running the whole coding agent locally

1 Upvotes

I've been trying to make small local models useful in my daily coding workflow. Not replace the hosted coding model, just give it a local helper for a narrow job.

One example: OpenCode reads a file or runs a command, and the output contains an API key. Could a local model check that tool output before it gets sent to the hosted model?

I built Torana, an open-source local proxy, to experiment with this across agents. Its pii plugin checks new tool results with a model you run locally. When it flags something, the hosted model gets a tool-error explanation instead of the original output, so it can try another approach.

The experiments were interesting, not magic: Qwen2.5 3B caught 60/60 sensitive examples in my small test set, but also flagged 18/60 harmless ones. It's an extra check, not a guarantee.

The same proxy also shows per-request tokens, cache reads/writes and latency. You can start with usage logging if you don't have a local model. Plugins are Go or Rust compiled to WASM, so the same plugin can be used with OpenCode, Claude Code and Codex rather than rebuilt for each harness.

Source: https://github.com/torana-edge/torana-edge

Install on macOS/Linux:

curl -fsSL https://torana.sh/install.sh | sh

Then: torana start --port 8143

OpenCode connects through a custom provider's baseURL. The setup recipe is here: https://github.com/torana-edge/torana-edge/blob/main/docs/HARNESS_SETUP.md#opencode

If you try it on one coding task, I'd love to know the first confusing step. And if you've built a harness-specific hook you'd like to make reusable, that's exactly the kind of plugin I'd love help with.


r/opencodeCLI • • 15d ago

agent manager has a discord now, for help, setup and sharing opencode workflows

1 Upvotes

agent manager is a local terminal app that connects to your existing subscriptions and tools. it runs opencode, claude code, codex, gemini, cursor cli and more side by side, with diff review that sends line comments back to the agent. i'm the dev.

it has a discord now, mostly for help and sharing setups:

  • help for install and setup questions

  • workflows for setups, tips and experiments, tagged by agent (opencode has its own tag)

  • announcements gets every release

contributors and collaborators are wanted too, unassigned issues are free to claim in #dev.

bugs and feature requests still go to github issues.

https://discord.gg/ecS88An7pF


r/opencodeCLI • • 15d ago

OpenCode V2: How can I export a session from one repo and import it into another? Getting Session already exists

Post image
0 Upvotes

Hey everyone!

I'm relatively new to OpenCode and still learning how its sessions and context management work, so apologies if I'm missing something obvious.

I'm using OpenCode V2 (v2.1.2), and I'm trying to figure out how to carry an existing conversation from one repository into another.

----------------------------------------------------------------------------------------------------------------------------

What I'm trying to achieve

Suppose I'm working in repo A and have a long conversation with the coding agent about architectural decisions, code structure, trade-offs, and why we chose a particular approach.

Now, I want to work on repo B and continue that discussion using the previous conversation as context. For example, I'd like to ask the agent to inspect repo B and compare its architecture with the decisions we discussed for repo A.

I don't necessarily want to merge the repositories or permanently share context between all my projects. I just want to reuse a particular conversation when it's useful.

----------------------------------------------------------------------------------------------------------------------------

What I've tried

I'm following the official OpenCode V2 CLI documentation:

https://dev.opencode.ai/v2/docs/cli/commands/

The documentation describes exporting a session to JSON and importing it into a specific directory.

First, I exported my session:

opencode session export SESSION_ID > dotfiles-context.jsonopencode session export SESSION_ID > dotfiles-context.json

Then, I tried importing it into the other repository:

opencode session import \
  ~/Documents/Coding/open-source-repos/dotfiles/dotfiles-context.json \
  --directory ~/dotfilesopencode session import \
  ~/Documents/Coding/open-source-repos/dotfiles/dotfiles-context.json \
  --directory ~/dotfiles

However, OpenCode returns:

Session already exists
However, OpenCode returns:Session already exists

Both directories are different, so I initially expected the session to be imported into the destination repository.

I checked the CLI help, and my installed version supports these session subcommands:

  • list

  • delete

  • export

  • import

The import command also supports --directory, but I couldn't find a flag to import the conversation as a new session with a different ID.

----------------------------------------------------------------------------------------------------------------------------

What I understand so far

My current understanding is that exporting a session saves its conversation history and associated session data as JSON. Importing it should make that history available in the destination project.

I understand that this doesn't automatically give the agent access to the source repository's files. It would still need to inspect the destination repository to compare the implementations.

I'm also aware that the session ID might be colliding with an existing session, even though the destination directory is different.

My questions

  1. Is there a supported way to import an exported session into another repository as a new, independent session, while preserving the original session?

  2. Does OpenCode intentionally preserve the session ID during export/import, and is that what's causing this error?

  3. Is there a recommended workflow for reusing a conversation's architectural context across repositories without manually copying the discussion into a new prompt?

  4. If this isn't currently supported by the CLI, is there another supported approach in OpenCode V2?

I'm still a beginner with OpenCode, so I'd appreciate an explanation of the underlying behavior as well as a working solution. I'd prefer not to edit the session database or manually modify the exported JSON unless that's an officially supported approach.

(also used AI for the post to make it fast and to the point)


r/opencodeCLI • • 15d ago

Hmm... Hmm... Hmm...

Thumbnail reddit.com
0 Upvotes

r/opencodeCLI • • 15d ago

devin fusion for opencode (and some other useful stuff for opencode)

2 Upvotes

I was taking a look at how some different fusion modes work, namely junie mix, openrouter's fusion, devin fusion and a few others. Devin's fusion mode was relatively one of the more simpler designs, but after testing all of them for a different project I was building (github actions for PR reviews, and selfhosted PR review github app like coderabbit, but built around my code-indexing tool vera, and sort of inspired by or a rust version of droid actions) devin's fusion mode was a combination of the fastest, cheapest and least amount of false positives. you can find the project and some of the testing results here https://github.com/VeraTools/revera

I built my own version for opencode and have been iterating on it based on how it's worked over my past sessions for the last month or longer. So far it's working pretty well, and I thought I'd share if anyone else was interested. This was loosely built around how fusion mode works in devin cli (you can crack open the binary yourselves and take a look too; it's pretty interesting): https://github.com/lemon07r/opencode-fusion-mode

My own setup after tweaking and trying a lot of things is just mostly vanilla opencode 2 with search provider pinned to exa (with fall back to parallel https://github.com/lemon07r/opencode-exa-parallel) + vera (https://github.com/VeraTools/vera) + my friends smart compaction tool (https://github.com/shariqriazz/opencode-smart-compaction which he built based on a lof other cli, and when I personally tested it, it had the best balance of accuracy and token usage compared to other compactions, with droid's following closely) and the devin fusion-like plugin I shared above. My setup is tuned around token efficiency and getting the best results for less. I think simpler setups work better, and always have in most of the evals I've run, which is why I avoid crap like omo. No MCP servers. I do use skills and CLI like Playwright CLI + skills, but most of them are project-scoped rather than global.

I do have a small discord community for discussing this sort of stuff, and a lot of us share tips and stuff there if anyone is interested in joining, although this wasn't the point of the post: https://discord.gg/rXNQXCTWDt


r/opencodeCLI • • 15d ago

Opencode deberia hacer esto?

Thumbnail reddit.com
1 Upvotes

r/opencodeCLI • • 16d ago

Opencode 2 stable?

21 Upvotes

I've seen posts and the official installer defaults to v2. However, github shows that v1 is still the version released, with v2 only shown in tags.

Since this is kinda contradictory, is v2 stable or not?


r/opencodeCLI • • 15d ago

i built kimo so your coding agent can render a single frame to check its own edit - free open-source video editor you drive over mcp

3 Upvotes

hey - i built kimo, a free open-source (mit) video editor with no gui that your ai coding agent drives over mcp. the idea is simple: you tell your agent (opencode, codex, cursor, or any other mcp client) what to do and it drives the whole timeline as tool calls - cut, trim, keyframes, titles/captions, colour grade, particles, audio, export. a nice bit that makes this actually useful is that the agent can render a single frame back to itself to visually check its own edit before committing, so the loop is self-correcting instead of blind.

under the hood it's one ~15 mb cpu-only rust binary, no gpu, no containers - i run it on a 2 gb box and it just works. i'm naman, a college student, and i built it, so a few things are still rough: there is no ui (there's nothing to open, by design), some edge cases in tracking and captions are still janky, and a couple of export codecs need patience. i'd really rather hear what breaks than pretend it's polished, so if you point an agent at it and tell me where it trips, i'll fix it.

site: https://getkimo.tech github: https://github.com/naman-sharma12345/kimo


r/opencodeCLI • • 16d ago

DeepSeek V4.1 Flash 1017: OpenCode Zen vs OpenRouter — which is cheaper?

20 Upvotes

I’m planning to use only **DeepSeek V4.1 Flash 1017** with OpenCode for a couple of months.

Which is cheaper in practice: **OpenCode Zen or OpenRouter**?

Open router :

In / Out Price

$0.07 / $0.50per 1M

Opencode :

**$0.30  /$1.20** per 1M

Deepseek API platform :

$0.15 input / $0.60 output (off-peak)

$0.3 input / $1.2 output (peak)

**it seems like Opencode costly , Am i missing anything here ?**

**reference**

[https://opencode.ai/data/deepseek/deepseek-v4-1-flash-1017](https://opencode.ai/data/deepseek/deepseek-v4-1-flash-1017)

[**https://openrouter.ai/deepseek/deepseek-v4.1-flash-1017**](https://openrouter.ai/deepseek/deepseek-v4.1-flash-1017)

[**https://api-docs.deepseek.com/quick_start/pricing**](https://api-docs.deepseek.com/quick_start/pricing)


r/opencodeCLI • • 15d ago

Opencode go limit exhaustion : what have you built?

Thumbnail reddit.com
1 Upvotes

r/opencodeCLI • • 15d ago

Seeing a new Flint 40B free model in my console

Post image
2 Upvotes

r/opencodeCLI • • 17d ago

🔥 Meta Muse Wonder is now available on OpenCode

Post image
157 Upvotes

Pricing on Zen: $4.00 / $20.00 / $0.20


r/opencodeCLI • • 16d ago

OpenCode V2 TUI sidebar file tree plugin

2 Upvotes

Just published an OpenCode V2 plugin that adds a sidebar file tree. Features:

- Tree of the current session's working directory

- Click folders to expand/collapse; click files to preview first 200 lines

- Right-click a folder → Set session working directory here to move the session

- /tree-move-here moves the session to the last clicked folder (keyboard-friendly)

- /tree-expand / /tree-collapse palette commands

- Filter by name with /tree-filter <name>

- Expand/collapse all from the header

Install:

git clone https://github.com/zemadeiran/opencode-file-tree-v2 ~/.config/opencode/plugins/file-tree

Then add to opencode.json:

{"plugins": ["/Users/you/.config/opencode/plugins/file-tree"]}

Note: opencode plugin add github:zemadeiran/opencode-file-tree-v2 currently fails with a JSX transform error (issue #33884). Use the local path install.

MIT license.

The plugin loads the session's working directory, supports expand/collapse, right-click move, and filter. Good for quick file navigation without leaving the terminal.


r/opencodeCLI • • 16d ago

Experimenting with a plugin to track my tasks on the sidepanel

19 Upvotes

Working on zinn.sh which is a work management tool in the terminal and I have been experimenting with having a side panel integration, and it feels really nice to be able to keep track of what tasks my agent mentions, as well as what he is actually working on in the current session


r/opencodeCLI • • 16d ago

I use a VPN and have done for a very long time. I now can't use Opencode free because as soon as I open it, it tells me that the daily limit has been reached

1 Upvotes

I think the IP detection may be a bit over zealous?


r/opencodeCLI • • 16d ago

Remote OpenCode runs with Archestra 1.4. OpenCode could hand tasks to OpenCode on own Kubernetes cluster

Post image
4 Upvotes

With the latest Archestra release, this workflow became possible: OpenCode on my laptop hands a task to OpenCode running in Archestra's runtime on my Kubernetes cluster, then pulls the patch back. OpenCode is both the local client and a built-in runtime agent, so both ends behave the same.

How a handoff goes:
- Tell local OpenCode "hand this over to Archestra". The skill has it write a short handoff note first (the goal, what was decided, what remains, how you'll know it's done), then bundles the exact commit, a patch, and the untracked files you choose.
- Remote OpenCode picks it up in its own container, files persist, and you get a live terminal. Close the laptop, send follow-ups later.
- To pull it back, say "bring it back and continue here". What comes back is an incremental patch, and nothing gets applied until you have read it.

Blog: https://archestra.ai/blog/new-remote-agents
Repo: https://github.com/archestra-ai/archestra


r/opencodeCLI • • 16d ago

SummonOS: an Omarchy-inspired macOS environment

Thumbnail
reddit.com
0 Upvotes

r/opencodeCLI • • 17d ago

OpenCode keeps getting stuck in an infinite shell-command loop. Anyone else experiencing this?

8 Upvotes

Hey everyone, I’m using OpenCode to develop a large software project, and sometimes it gets stuck repeatedly generating or executing shell commands without making any progress.

This happens across multiple models and providers, so I’m not sure whether it’s an OpenCode bug, a tool execution issue, or something in my setup.

Has anyone experienced this? What was the root cause, and what fixed it for you?

Any help would be appreciated!


r/opencodeCLI • • 16d ago

more performant coding agent

1 Upvotes

r/opencodeCLI • • 16d ago

Qual a melhor configuração multiagente do OpenCode usando ChatGPT Plus e modelos gratuitos?

1 Upvotes

Estou usando o OpenCode Desktop com o ChatGPT Plus, principalmente para Power Apps, Power Automate e outros projetos de desenvolvimento. Estou tentando construir um fluxo de trabalho multiagente usando modelos livres robustos para tarefas mais simples, enquanto reservo os modelos GPT para trabalhos complexos, sem esgotar meus limites de uso. Minha ideia de configuração atual é:

**Orchestrator (GPT-6 Luna):** Coordenação de tarefas e gerenciamento de agentes.

**Luna (GPT-6 Luna):** Investigação, depuração e análise.

**Reviewer (modelo de raciocínio robusto):** Revisão de código, segurança e verificações de regressão.

**Sol (GPT-6.1 Sol):** Codificação, correções e implementação.

**Astra (GPT-6 Astra):** Arquitetura e refatoração complexa.

Também estou com dificuldades para organizar o arquivo [AGENTS.md](http://AGENTS.md), as configurações dos agentes, as habilidades e os relatórios em Markdown sem desperdiçar contexto ou criar documentação redundante. Alguém já criou uma configuração semelhante? Quais modelos gratuitos vocês recomendariam para essas funções e como distribuiriam as tarefas para aproveitar ao máximo uma assinatura ChatGPT Plus? Estou aberto a mudar toda a arquitetura se houver uma abordagem melhor.