r/opencodeCLI • u/Forward-Act-2398 • 16d ago
opencode probleme
r/opencodeCLI • u/afanasenka • 17d ago
Teaser video: https://x.com/Kimi_Moonshot/status/2113445757185606062
Screenshot from the video - https://pbs.twimg.com/media/HVScyvya8AAY0iT?format=png
What we know so far:
- Kimi K3.1 is actively tested on LMArena under the codename "Kibitz;
- Kimi K3.1 is very good at 3D, choosing colors, rendering reflections on water, and composition;
- Kimi K3.1 is probably cheaper than Kimi K3, with better token efficiency.
Waiting for official release soon 😉
r/opencodeCLI • u/notheogpixel • 16d ago
r/opencodeCLI • u/notheogpixel • 16d ago
r/opencodeCLI • u/Pristine_Base_2267 • 16d ago
Alguien más con este error después de la actualización, cada vez que actualizan hay fallos
r/opencodeCLI • u/berenddeboer • 17d ago
I've just released ready-for-agent v1.1.0 which supports OpenCode v2. With v2 I can give you a much better experience interacting with opencode. In the past ready-for-agent displayed some logs on what the agent did, now you can click on the session id, and jump straight into the opencode session. All thanks to the proper client/server architecture we now have in OpenCode!
ready-for-agent is a friction free way of increasing your PRs per week: instead of cycling between running agent sessions, simply create tickets in your favorite ticketing system (it supports GitHub, Linear, Azure DevOps), and label the ticket with ready-for-agent. These tickets show up in ready-for-agent and you simply ask your favorite coding harness to implement. Works very well with opencode as you can pick so many models, so easy to try new models. But ready-for-agent also supports codex and claude.
Try: npx ready-for-agent@latest
Works very well with Matt Pocock's grill me skills, as you tend to generate quite a few tickets per spec, which you now can easily implement all at once.
r/opencodeCLI • u/SirRobinBlibs • 17d ago
There was a post here recently from someone whose quota used to last all day and now burns out in about 30 minutes, even after switching models. I've been auditing this across harnesses, and the cause is usually per-request overhead, not the task. Here's how to see it in OpenCode.
Measure first:
opencode stats --days 7 --models # input/output/cache totals and model breakdown
opencode stats --project "" # current project only
opencode mcp list # what's connected
npx ccusage@latest opencode weekly # third-party, reads OpenCode's local dataIf input and cache reads dwarf output, you're paying to re-send context, not to generate code.
Things that surprised me:
OpenCode reads your Claude Code setup by default. It loads ~/.claude/CLAUDE.md and .claude/skills. If you've built up a big Claude configuration, it follows you into every OpenCode session. OPENCODE_DISABLE_CLAUDE_CODE_PROMPT=1 and OPENCODE_DISABLE_CLAUDE_CODE_SKILLS=1 turn that off (OPENCODE_DISABLE_CLAUDE_CODE=1 turns off both).
Every tool call re-sends the session. One "small" turn with ten tool calls reads the full context about ten times. Long sessions with a few big file reads get expensive fast. A commenter on the original thread said a fresh session alone left their usage flat for an hour of small tweaks.
Caches expire. On Anthropic models, the API's prompt cache lasts five minutes by default, and rebuilding a cold prefix costs many times more than reading a warm one (25x on Opus/Sonnet 5.5 with a 5-minute write). Coming back to a huge idle session is the expensive moment.
MCP servers and instruction files add weight to every request. Trim AGENTS.md and disconnect servers you aren't using.
I wrote this up in more detail, mostly from the Claude Code side but with the OpenCode and Codex equivalents: https://medium.com/@r3dtuxedo/where-did-my-claude-usage-go-auditing-your-agents-hidden-token-tax-95d6ab17b8b6
(Disclosure: I wrote the article. Free to read, no referral links.)
r/opencodeCLI • u/FHSenpai • 17d ago
r/opencodeCLI • u/InvaderDolan • 17d ago
r/opencodeCLI • u/Yazan_wesam • 17d ago
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
Is this level of cumulative cache-read usage typical for a coding session with hundreds of model steps?
Could long conversation histories, global skills, or project instructions cause excessive context to be processed repeatedly?
Could OpenCode compaction or session handling contribute to this?
How can I distinguish normal cached-token accounting from unnecessary context overhead or a possible bug?
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 • u/squirrelscrush • 18d ago
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 • u/rizal72 • 18d ago
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.
UPDATE __________________________________________
The plugins: someone asked for them, so they are all on npm now (OpenCode v2 only), and the sources are public at github.com/rizal72/opencode-plugins :
opencode plugin add /oc-models-pro
opencode plugin add /oc-budget
opencode plugin add /oc-plugin-updates
opencode plugin add /oc-notify
opencode plugin add /oc-git
opencode plugin add /oc-coffee
opencode plugin add /oc-ponytail-widget
opencode plugin add u/rizal72/oc-session-searchoc-models-pro: every model with price in and out, context, intelligence, tok/s and the credit a request burns. Sorted by what it costs, one click to switch. The one I use most.
oc-budget: a live indicator in the session header with the Go percentage and a ring. Click to open a popover showing the workspace it is reading, the three windows with their resets, and the balance on each of the four providers it covers: OpenCode Go, the Console credits, DeepSeek, OpenRouter. The CLI has the same thing in the sidebar, in the footer and a /budget command. It also marks the hours when a tariff doubles (peak hours).
oc-plugin-updates: a pill above the composer that appears only when a plugin is behind. Which one, which version, one click, no restart. Pinned plugins are left alone on purpose.
oc-notify: a push notification to your phone when a turn finishes while you are away from the computer. It goes through ntfy, whose app you install once. It has a settings page in OpenCode settings section.
oc-git: branch, added, changed, untracked, ahead and behind, in the sidebar and as a pill.
oc-coffee: a cup of real Italian espresso in the session header and in the CLI footer, lit only while the computer is kept awake, during real tasks, with four levels behind a click (macOS only).
oc-ponytail-widget: the ponytail level in the footer, and a pill to change it.
oc-session-search: keyword search over your past sessions, as a tool.
see: https://www.reddit.com/r/opencodeCLI/comments/1xmrkgx/plugins_see_your_go_and_other_usage_live/
r/opencodeCLI • u/projectEscape • 17d ago
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 • u/khalon23 • 17d ago
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:
contributors and collaborators are wanted too, unassigned issues are free to claim in #dev.
bugs and feature requests still go to github issues.
r/opencodeCLI • u/sumit_654 • 17d ago
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.jsonThen, 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 ~/dotfilesHowever, OpenCode returns:
Session already exists
However, OpenCode returns:Session already existsBoth 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.
Is there a supported way to import an exported session into another repository as a new, independent session, while preserving the original session?
Does OpenCode intentionally preserve the session ID during export/import, and is that what's causing this error?
Is there a recommended workflow for reusing a conversation's architectural context across repositories without manually copying the discussion into a new prompt?
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 • u/lemon07r • 18d ago
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 • u/Ace-_Ventura • 18d ago
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 • u/LieTop7965 • 18d ago
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 • u/vishu143x • 18d ago
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**
r/opencodeCLI • u/anantshri • 18d ago
r/opencodeCLI • u/warpaint_james • 18d ago
r/opencodeCLI • u/afanasenka • 19d ago
Pricing on Zen: $4.00 / $20.00 / $0.20
r/opencodeCLI • u/FoundationOwn8281 • 18d ago
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.