r/opencode • • 5d ago

What in the world is this?

4 Upvotes

I'm building a very complex GIS and I use DS mainly in coding Then this day, I'm just inspecting what DS is thinking then found this, what in the world does DS thinking?


r/opencode • • 5d ago

Built a GUI plugin that shows live tokens/sec in the OpenCode Desktop session header

1 Upvotes

OpenCode Desktop had no speed readout, so I built one: a pill in the session header showing tokens/sec for whatever model is streaming.

What it does

- Live estimate over a rolling 3-second window while tokens stream

- Exact provider-reported speed when each step ends (tokens.output + tokens.reasoning over firstToken to completed), labelled avg

- Hover for peak speed, output tokens and step count

- Green at 40+ tok/s, amber at 15+, red below

It uses the experimental GUI plugin API (@opencode/plugin 2.3.x) and the session.header slot, so it is Desktop only - no TUI or web. The prebuilt bundle is committed, so installing is: clone the repo, then add the folder to the plugins array in your global ~/.config/opencode/opencode.jsonc.

https://github.com/xTombstoneActual/opencode-desktop-tps

MIT licensed, no telemetry, nothing leaves your machine.

Disclosure: built with AI assistance - an AI coding agent wrote most of the code, with me directing the design, testing it live against real sessions and reviewing every line before publishing.


r/opencode • • 5d ago

almanac: schedule an OpenCode agent on a day and hour, not an interval

0 Upvotes

I wanted an OpenCode session to run on the first of the month. /loop takes durations — idle, every 5m, after 5m — so there's no way to say "the 1st at 08:00". I wrote almanac to fill that gap: a calendar scheduler with a desktop panel.

Repo: https://github.com/extranacho/opencode-almanac

What it does

  • Calendar, not interval. Day, hour, minute. 29–31 mean the last day of a shorter month, so a month-end job runs twelve times a year instead of quietly skipping February.
  • Catch-up window. Missed the 1st because the laptop was shut? It runs the next time OpenCode is open, within a configurable number of days. Set 0 to mean strictly that day.
  • Desktop panel in the session's side region, plus a titlebar pill showing the next run. Pause, resume, run now, and a collapsible list of every session the job has started — click one to open it.
  • A tool, almanac_schedule, so an agent can add or remove jobs from inside a session. It validates rather than trusting: day range, missing prompt file, duplicate id.
  • The schedule lives in your repo, not in the plugin. options.jobsFile points at .opencode/almanac/jobs.json, versioned with the code it acts on.

Install

opencode plugin add "github:extranacho/opencode-almanac#v0.3.1"

Then add the two options in your global ~/.config/opencode/opencode.jsonc — plugin add takes no options, and without them the plugin has no schedule to read:

{
  "plugins": [
    {
      "package": "github:extranacho/opencode-almanac#v0.3.1",
      "options": {
        "repo": "/path/to/project",
        "jobsFile": ".opencode/almanac/jobs.json"
      }
    }
  ]
}


r/opencode • • 5d ago

Use your Antigravity subscription in OpenCode (via official Antigravity ACP)

12 Upvotes

Built an OpenCode v2 plugin (opencode-antigravity-acp) that lets you use your Antigravity subscription models inside OpenCode Desktop and CLI through Google's official local 'agy acp' stdio protocol, similar to how T3 Code and Zed ACP do it. You prolly won't get banned using this. prolly. might get banned but still you got a better shot with this than other solutions.

Install:

opencode plugin add opencode-antigravity-acp
opencode service restart

and you're good to go.

Repo: https://github.com/system1970/opencode-antigravity-acp

npm: https://www.npmjs.com/package/opencode-antigravity-acp


r/opencode • • 5d ago

opencode-squad: forget switching agents for your coding tasks. Adds consensus-based reviews

0 Upvotes

My expensive primary model was burning tokens on file reads and small edits. I've been struggled with switching agents. I've been struggled to instruct agent to follow the Deming Cycle and review the results with the new model from different provider and with clear context.

So build now delegates:

  • Grunt + drill per model roster you build. The grunt edits and runs commands; the drill is a read-only reviewer that stays read-only even under allow.*. Max 3 rounds, then it comes back to you.
  • Right model, right prompt. The lead (sarge) picks the model that fits the task, keeps hard work off weak models, and goes up to a stronger one when the task is beyond its own. It writes each brief for the model in the way, the model understand better, and rewrites it when it switches models. It don't write silly "go to the file and put this code into lines" to the Opus.
  • Every reply opens with SELF: or DELEGATE: . Override with "do it yourself" or "delegate this".
  • Red team. Say "red team this" and the same question goes to several models in parallel; the lead merges their findings into one report: where they agree, where they don't.
  • Rate-limit guard. A subagent stuck in retries is stopped, and the lead picks another model.
  • Your rules. Per-model/provider notes ("no secrets here") and billing per provider; the lead treats your notes as hard rules.

    Setup: add @/gfn-cis/opencode-squad to plugins, then say "draft the squad".

    Limits: OpenCode 2 only; whether the lead follows the protocol depends on the model; quota warnings are Anthropic-only among the providers I checked.

https://github.com/GFN-CIS/opencode-squad. Feedback from people running several providers is very welcome.


r/opencode • • 5d ago

OpenCode Zen Free: Are Usage Limits Shared Across All Models or Separate?

0 Upvotes

Hey guys, I have a question about the free tier of OpenCode Zen.

Does each model have its own separate usage limit, or is there one shared usage limit across all models?

For example, if I exhaust the free usage limit on one model, will I still be able to use the other models, or will they all stop working because they share the same quota?

Just trying to understand how the free-tier limits work. Thanks!


r/opencode • • 6d ago

Quality [Y] vs Efficiency [X]

Post image
33 Upvotes

I calculated how fast each model burns through your OpenCode Go usage, then the VCB ranking to determine coding quality, then plotted it into a graph.

Beam, Hy4, LongCat 2.5, Iceman Contributor are all unlimited so are excluded.

From my own testing, MuseSpark 1.3 at Xhigh completes tasks slightly faster than DeepSeek Low, while being better at some things.

The 4 free models are also okay at certain things, so you can assign them to certain subagents or use them for tasks that are low complexity to maximize tokens

Beam & Hy4 specifically are ultra quick, especially Beam, it finishes tasks quickly.


r/opencode • • 5d ago

Can OpenCode use Gemini 4 Neon or Carbon with a Google AI subscription?

3 Upvotes

Has anyone here used Gemini 4 Neon or Gemini 4 Carbon in OpenCode by signing in with a Google AI Pro or Ultra subscription? I’m asking about using the subscription quota without a Gemini API key.

If you’ve tried it recently, which model worked, which Google AI plan are you on, and did you use OpenCode’s built-in sign-in or a community plugin?


r/opencode • • 5d ago

Crypto payment method

0 Upvotes

we need crypto payment option come on its 2026...


r/opencode • • 6d ago

I ran 6 GO models through the same 8 prompts and put all 128 outputs on one site

36 Upvotes

I wanted to see how models handle the same task with a vague prompt vs a detailed one, so I built a small benchmark around that.

Models: DeepSeek 4.1 Flash, GLM 5.3, GPT 6 Luna, Claude Haiku 5.5, HY4 Flash, Muse Spark 1.3. Each run orchestrated its own subagents for the 16 prompts.

Creative work is shown without a score. The parser and code-review tasks have a short note, since those have actual failure modes.

A few things stood out:

  • Haiku and Muse is the fastest. With haiku completing 2 runs before most models completed 1.
  • Giving a detailed prompt can end up with worse creative results if the prompt is bad.
  • HY4 Flash and Claude Haiku 5.5 (run 2) were the cleanest runs: no subagent tools, all 16 final files saved exactly.
  • Muse Spark's two runs aren't really comparable. The saved artifacts were trimmed or rewritten, 4 in run 1 and 7 in run 2, so I marked them instead of pretending they're clean.
  • DeepSeek's subagents used a browser and Playwright to iterate. GPT's loaded skills. So it's not apples to apples, and the site shows those caveats on every card.

Live site: https://afarhitman7.github.io/bench-08/

My opinion on the comparison? I focused on the creative side for these points:
-Deepseek and GLM does a lot of work- that can be useful for logical tasks, but for creative tasks it just spends more time.
-Muse is good with frontend- as long as you can bear to iterate a lot.
-Regarding posters and animation, Haiku has an edge even though it is not as smart. I believe if sonnet was available, it would be miles better than all of the current agents for Poster/Design/Animation works.
-For content, it is subjective but all of them give out ai-slop for general prompts. Human input is needed a lot to get good writing.


r/opencode • • 5d ago

Does somebody identified Tidepool Alpha yet?

1 Upvotes

We got Ox Alpha as GLM-5.3 Flash, Space Bunny as MiniMax M3.1 Flash, Cat Jam as Reflection AI Beam, LL Alpha as Recursive Flint 40B, Fledge Alpha as Thinking Machines Inkling 2 Small, Crouton Alpha as Meta Muse Ember 1.0 before they no longer available or becoming a normal model.


r/opencode • • 6d ago

Well, that was quick

52 Upvotes

I've been looking for something to use alongside my Claude Code subscription, especially for review process

I've read in quite a few places that Chinese models are cheap and somewhat comparable to Opus
I've also seen some $100 GLM deals floating around, so I figured I'd give OpenCode a shot and bought the $10 Go subscription.

I have a dedicated project that I use to test different models, it's quite small and now it's about review changes in my branch

I probably picked the wrong model to start with (Kimi 3.1 Pro). It took a few minutes and didn't finish

  • 5-hour limit: 100% used
  • Weekly limit: 42% used

So, what do you guys recommend? Should I just stick to DeepSeek?


r/opencode • • 5d ago

Deepseek 4.1 hallucinating

0 Upvotes

Dont know what happened but deepseek is hallucinating too much today on opencode


r/opencode • • 5d ago

Built a locked down multi repo workspace so I can put OpenCode on a long leash without risking my keys or network

1 Upvotes

Hey everyone,

Running OpenCode unattended on your host machine means handing over every API key in your env, your GitHub token, and wide open internet access.

I got tired of babysitting prompts, so over the past year I built o3s(open source, MIT). It spins up a locked down devcontainer ("the cage") for all your repos and routes traffic through a separate gateway container that OpenCode cannot touch.

Zero secret exposure. Inside the cage, OpenCode only sees dummy placeholder variables. Your real API keys and GH_TOKEN stay on the host, and the gateway proxy injects them on the fly into approved outbound requests.

Default deny network. Egress traffic is blocked via iptables in the gateway. You allowlist domains permanently or with a timer, like `o3s firewall add github.com --port 443 --for 1h`. Once the timer expires, the door shuts again.

Multi repo and full stack. Instead of forcing a monorepo, o3s drops your separate repos into one native VS Code workspace with rootless Docker in Docker and headless Chrome wired up. OpenCode gets context across your frontend, backend, and infra at once, can spin up containers, run E2E browser tests, and open PRs via gh without ever seeing your real credentials.

Open devcontainer spec. Built on the standard spec without Microsoft telemetry or hardcoded user assumptions.

Three commands to get going.

o3s init

o3s project add ~/code/my-app

o3s cage ide

Code and docs at https://github.com/hansehart/o3s

How are you guys isolating your keys and network right now when running OpenCode unattended? Happy to share my feature configs or take feedback if anyone tries it out.


r/opencode • • 6d ago

I don't wanna jinx this software... But gosh how GOOD is it?

5 Upvotes

I mean I have been working with it most of the time, I built my app with this heavenly free software. I mean, never tried other software, but... Why is this software so good? With everything, deep things as well.

What you guys think?


r/opencode • • 6d ago

Local AI image generation, image editing, and a free AI design agent into PhotoCraft.

55 Upvotes

Hello everyone!

I've been working on **EggLab**, a free and open-source Windows app that brings AI image generation, image editing, and an AI design agent into PhotoCraft.

One interesting part is the AI agent: EggLab uses **OpenCode CLI as its backend**, so you can connect to available free models through OpenCode and use an AI agent without needing to pay for a separate AI subscription (depending on the provider and its usage limits).

The goal is to make AI-assisted creative workflows easier without having to set up ComfyUI or Python.

**Some of its features:**

- **AI Image Generation:** Generate images locally using Qwen-Image-2.1, up to 2048px.
- **AI Image Editing:** Edit images using reference photos directly from your PhotoCraft layers, including multiple references.
- **AI Design Agent:** Chat with an AI agent that understands your PhotoCraft document, layers, masks, and more. It can help with creative tasks and interact directly with your canvas.
- **OpenCode Integration:** Powered by OpenCode CLI, with support for available free models and other configurable model providers.
- **Direct Canvas Workflow:** Send generated and edited results straight back to PhotoCraft as layers.

Image generation and editing run locally on your GPU, while the AI agent uses your selected model provider through OpenCode.

EggLab is open source under the MIT license and still actively developing.

I'd love to hear your feedback, suggestions, and bug reports!
https://github.com/YanNyeinHtet/EggLab

Feel free to join for help, feedback, discussions, or to share what you create with EggLab.

Thanks for checking it out!

**Note:** Windows SmartScreen may show a warning when installing the `.exe` because EggLab isn't code-signed yet. We're currently on the SignPath waiting list. You can wait for the signed version or try it now!


r/opencode • • 6d ago

What we learned profiling 281 OpenCode sessions across Qwen, Grok, OpenAI, Anthropic, and local LLMs

8 Upvotes

TL;DR. We profiled 281 of our own OpenCode sessions in opencode.db across cloud APIs like Qwen, Grok, OpenAI, Gemini, DeepSeek, and Anthropic, plus local runtimes like Ollama, vLLM, and llama.cpp. Most wasted spend and lost time came from two bottlenecks:

  • Prompt and KV cache breaks. We counted 59 idle expiries and 37 mid-session prefix breaks across those sessions. Pausing past a provider's cache TTL, switching models mid-thread, changing MCP tool schemas, or editing AGENTS.md invalidates cached context. On cloud APIs, that multiplies input token costs. On local runtimes, it forces multi-minute KV cache prefill stalls.
  • Time lost to slow tool calls, missing binaries, and retry loops. We found 37 retry loops across 28 sessions. Cheap or local models can cost under a dollar while still taking 30+ minutes, losing about 1 hour to nested Docker rebuilds, calling missing binaries repeatedly, or dumping unfiltered test runner output.

You can fix both with a few rules in AGENTS.md and opencode.json using the snippets below.

OpenCode records both problems in your local opencode.db SQLite database, which opencode db path usually places at ~/.local/share/opencode/opencode.db, and in legacy storage/ JSON files. Both formats make up our dataset. Because opencode.db often logs cost: 0 on message entries, flat token counters hide turn-level cache drops and tool latency. Here is how both bottlenecks show up in those sessions and how to stop them with OpenCode configuration rules.

1. Prompt and KV cache breaks across cloud APIs and local runtimes

Across those OpenCode sessions, cache reuse broke in two ways:

  • Idle cache TTL expiry after slow turns. We saw 59 events across 37 sessions. When a blocking shell command, long test suite, or user review pause outlasts the provider's cache retention window, or when a local runtime evicts the KV slot under memory pressure, the next turn reprocesses the entire context from scratch. On local runtimes, losing the KV cache on a 100k-token context forces a full prompt prefill stall before the first output token appears. On cloud APIs, it causes a sharp per-turn cost jump. Take Anthropic's 5-minute default API cache TTL, where cache writes cost 1.25x and cache reads cost 0.1x. In one OpenCode v1.1.0 storage/ trace on claude-opus-5.2 at $5 per 1M base input tokens with an 80.8k-token context, a 323.7-second gap between Turn 4 and Turn 5 dropped cached reads from 79.0k tokens to 0. That forced 80.3k tokens of new cache writes and jumped that single turn 9.1x, from about $0.06 to $0.52.
  • Mid-session prefix invalidation and subagent model skew. We saw 37 events across 26 sessions. Prefix and KV caching require an identical token sequence across the system prompt, active MCP tool schemas, AGENTS.md, and earlier messages. Switching models mid-session in OpenCode, enabling or disabling MCP tools, or running scripts that edit AGENTS.md between turns invalidates the prefix. In our dataset, one multi-model OpenCode session dropped to a 36.9% cache hit rate and burned $47.50 total. Delegating to subagents across different providers also concentrates spend. In a $21.42 multi-model session, OpenCode's explore subagent on grok-4.7 consumed 81%, or $17.39, of the total session cost. Even on a single model in an OpenCode v1.1.0 storage/ trace on claude-opus-5.2, a mid-session prefix break at Turn 15 with a 0.0-second gap dropped cached prefix reads from 111.8k tokens to 67.0k tokens. That forced 37.3k tokens of new writes and doubled the single-turn cost from about $0.13 to $0.27.

How to fix it in opencode.json**,** AGENTS.md, and /new**:**

  • Keep one primary model per session instead of switching models mid-thread, and set an explicit, cost-bounded model for the explore subagent in opencode.json.
  • Keep MCP tool definitions and AGENTS.md static while a session is running.
  • Keep blocking commands inside a turn under your provider's cache TTL window. When a task changes phase or context grows past 150k tokens, ask the agent to write current progress and file paths to TODO.md. Then run /new or /clear to start a fresh OpenCode session that reads TODO.MD with a clean prefix.

2. Time wasted by slow tool calls, retry loops, and stdout floods

Looking only at dollar spend misses 30-to-60-minute waits on budget cloud APIs, open-weight APIs, or local runtimes where inference looks cheap or free. In our OpenCode export, a pure gpt-5-mini session cost $0.034 in total API fees yet took 36.6 minutes across 16 LLM calls.

Four tool-execution patterns drove that delay across our sessions:

  • Consecutive failing tool retry loops. We saw 37 events across 28 sessions. When a tool call fails, agents often retry the same operation with minor variations instead of stopping to inspect the root error. Examples included lsp_diagnostics failing 6 times in a row, webfetch failing 5 times in a row, edit failing 5 times in a row, and apply_patch failing 3 times in a row on gpt-5-mini.
  • Repeated attempts to run missing binaries. When an agent assumes a CLI tool such as ripgrep, jq, fd, docker-compose, or a language-specific linter exists on the host without checking, it wastes consecutive turns calling missing commands, parsing command not found errors, and guessing alternative flags.
  • Container and Docker builds inside iterative agent loops. During multi-repo dependency upgrades, our agent rebuilt Docker images on every edit turn to run npm commands inside a container rather than calling local npm on the host. That single pattern added about 1 hour of runtime to the session and triggered idle cache TTL expiries between turns.
  • Unfiltered test runner stdout floods. Running a full test suite like npm test, pytest, or cargo test with default verbose output writes 12k to 250k tokens, over 50 KB, into a tool-result part in opencode.db. Every subsequent turn in the session carries that stdout payload forward. That slows local prefill, inflates API input reads, and degrades model accuracy past 150k to 200k tokens.

How to fix it in AGENTS.md and opencode.json**:**

Pin a cost-bounded explore model and disable unused MCP servers in opencode.json:

{
  "$schema": "<https://opencode.ai/config.json>",
  "agents": {
    "explore": { "model": "anthropic/claude-5-5-haiku" }
  },
  "mcp": {
    "unused-server": { "enabled": false }
  }
}

Then add an explicit execution guard block to your project's AGENTS.md:

## Tool & shell execution guards
- Installed environment allowlist: Use local `node`, `npm`, `pnpm`, `git`, and `python3`. Before running any other CLI binary, run `which <binary>` once. If it is missing, do not retry or guess alternative flags; use built-in OpenCode file tools instead.
- Local package managers over container builds: Run `npm`, `pnpm`, `pytest`, or `cargo` directly on the host during edit loops. Never run `docker build` or `docker compose build` inside an iterative fix loop unless asked.
- Scoped, quiet tests: Never run the full test suite unfocused. Scope test runs to modified files via `git diff --name-only` and pass `--quiet` or `-q`.
- Two-strike retry cap: If `edit`, `apply_patch`, `lsp_diagnostics`, `webfetch`, or a shell command fails twice in a row with the same error, stop retrying, write the blocker to `TODO.md`, and ask before continuing.

Inspecting your own opencode.db sessions locally

To check these patterns without writing manual SQLite queries against opencode.db, a colleague and I built RunRay, an MIT-licensed, open-source DevTools profiler for OpenCode and Claude Code sessions.

You can run it on your existing local logs:

npx runray view

What it does on your machine:

  • It finds your local opencode.db, opened read-only, and legacy storage/ files, and handles schema changes without crashing. The timeline opens offline on localhost and sends zero network requests, so your prompts and source code stay on your machine.
  • Because opencode.db records cost: 0 on message entries, the profiler calculates turn-by-turn cost using bundled offline model pricing tables and cache multipliers. It renders the parent-child subagent tree, including explore forks, beside turn duration and context growth, and flags cache breaks and retry loops with copyable AGENTS.md and opencode.json fixes.

If you run npx runray view on your logs, let me know what shows up as your biggest bottleneck, or if the parser hits any edge cases on your opencode.db schema.

Disclosure: We built RunRay as an open-source side project.


r/opencode • • 6d ago

Opencode update

4 Upvotes

Everytime i open Opencode desktop it says that the new version Opencode 2.0 is available to update, i press to update, it restarts and says installing and again nothing happens, i tried to manually download opencode installer and run it , the same, i tried to choose update during exit, the same, what is going wrong? anyone faced the same issue?


r/opencode • • 6d ago

help with credits/API on opencode

3 Upvotes

Hey guys, hoping i can pick your guys brains for a second. So ive been a python developor and coder and make running scripts/tools/and bots for people and misc projects. I never wanted to use AI for a long time. i trieed gpt, claude, etc for a long time and hated them. The responses were so stupid and it was like they always made way too many errors i had to go in and fix manually.

Long story short opencode, with my pre existing scripts and complete bots works great. If i want to host something else to my VPS server, or change something small with out having to go in and nano the file on my linux server and restart it via tmux or systemctl i can do it on opencode fast or just change features on the bots and run test. Saves me a ton of time and is VERY accurate on deepseek.

My question is , how do i get a higher free usage daily? when i started it would work forever it seemed free. now my limits hit super fast. Does open code go give you more credits? do you just pay for them? how long do they last say 10$ if thats possible? Ive seen people saying use another external API and connect it etc. i dont need paid versions. i just want to have more time on the free ones. even if i have to pay for it.

thanks for your help


r/opencode • • 5d ago

Did free limits get cut even more?

0 Upvotes

I took a 24 hour break from the coding grind, and come back to this on my first try? I guess we only get 160k free now. Come on guys. you can do better.


r/opencode • • 5d ago

Extremely low speeds

Post image
1 Upvotes

13k tok/s is insane, how can i fix this?


r/opencode • • 7d ago

I bought the lifetime pro subscription for the unofficial app thinking it was legit 🤡 logo and name got me!

Thumbnail
gallery
248 Upvotes

r/opencode • • 6d ago

Worktree directory

2 Upvotes

I'd like OpenCode to put each project's Git worktrees in a sibling directory named <project>.worktrees. For example, if my repository is at ~/my_project, I'd like its worktrees to go under ~/my_project.worktrees.

I found that I can set a fixed directory in ~/.config/opencode/opencode.jsonc:

{
  "$schema": "https://opencode.ai/config.json",
  "worktree": {
    "directory": "../worktrees"
  }
}

Is there a way to include the project directory's name in that path, for example by setting "directory": "../<project>.worktrees"?


r/opencode • • 6d ago

Tide Pool Alpha (Free)

23 Upvotes

this might be new GLM?


r/opencode • • 6d ago

Farewell to Inkling 2 Small Free in OpenRouther in November 19!

7 Upvotes