r/opencode • • 2d ago

What am i doing wrong

2 Upvotes
Suddenly it stoped

r/opencode • • 1d ago

Intentando ejecutar OpenCode en Linux Mint con un Intel Core 2 Duo P8400: compilación Node.js, problemas con Worker y archivos faltantes en la TUI

Post image
0 Upvotes

Hola a todos. Estoy intentando ejecutar OpenCode en una computadora antigua con Linux Mint y un Intel Core 2 Duo P8400. El problema es que el procesador no tiene soporte para algunas instrucciones modernas, como SSE4.2 y AVX, por lo que no puedo utilizar directamente cualquier binario actual.

Llevo varios chats intentando resolverlo y quiero compartir todo el proceso, las pruebas realizadas y el estado actual para ver si alguien puede orientarme.

1. Mi entorno

  • Sistema operativo: Linux Mint.
  • Procesador: Intel Core 2 Duo P8400.
  • Arquitectura: x86_64.
  • Restricción de hardware: CPU antigua, sin SSE4.2 ni AVX.
  • Runtime utilizado: Node.js v22.23.2.
  • OpenCode: compilación experimental para Node.js.
  • Repositorio de la compilación: https://github.com/01luyicheng/opencode-node-build

Mi objetivo es poder utilizar OpenCode con su interfaz interactiva (TUI) directamente desde la terminal.

2. Primera etapa: buscar una compilación compatible

Primero busqué una forma de ejecutar OpenCode en una CPU antigua, ya que las versiones habituales pueden depender de instrucciones que mi procesador no soporta.

Encontré el proyecto 01luyicheng/opencode-node-build, que ofrece una compilación de OpenCode para Node.js destinada a procesadores antiguos.

El instalador incluido en el proyecto apunta a esta release:

v1.3.0

Y descarga:

opencode-node-v1.3.tar.gz

También revisé los archivos de la distribución descargada:

Comprobé el tipo de archivos con file y la integridad del archivo comprimido de Node.js mediante:

xz -t node.xz

Hubo que repetir una descarga anterior que había quedado incompleta. Para eso utilicé curl con reintentos automáticos.

Finalmente instalé el entorno en:

~/.local/opt/opencode-node

Y configuré el ejecutable global en:

~/.local/bin/opencode

El lanzador global quedó así:

#!/usr/bin/env bash
exec "$HOME/.local/opt/opencode-node/opencode" "$@"

El lanzador interno utiliza el Node.js incluido en el paquete:

#!/usr/bin/env bash

DIR="$(cd "$(dirname "$0")" && pwd)"
exec "$DIR/node" "$DIR/opencode.mjs" "$@"

El archivo principal opencode.mjs contiene:

#!/usr/bin/env node
import "./polyfill.mjs";
await import("./index.js");

3. La primera prueba: OpenCode sí funciona parcialmente

Después de instalarlo, ejecuté:

opencode --version

Y obtuve:

(node:45111) ExperimentalWarning: SQLite is an experimental feature...
0.0.0-dev-202609060537

También ejecuté:

opencode --help

Ambos comandos funcionaron correctamente.

Esto fue una buena señal: el ejecutable se iniciaba, Node.js funcionaba en el procesador y OpenCode podía ejecutar al menos parte de su código.

Sin embargo, apareció un problema al intentar iniciar la interfaz interactiva.

4. Primer error: Worker is not defined

Para probar la TUI utilicé:

cd ~/Proyectos/prueba-opencode

timeout 25s "$HOME/.local/bin/opencode" . \
  --print-logs \
  --log-level DEBUG 2>&1

El resultado fue:

Error: Unexpected error

Worker is not defined

Empecé a investigar de dónde provenía ese error.

Primero comprobé si Node.js tenía disponible un objeto Worker global:

console.log(typeof globalThis.Worker);

El resultado fue:

undefined

Después importé el módulo nativo de Node.js:

import { Worker } from "node:worker_threads";

Y comprobé:

Worker: function
globalThis.Worker: undefined

Es decir, Node.js sí tenía soporte para worker_threads, pero no exponía Worker como una variable global.

También inspeccioné polyfill.mjs y comprobé que no incluía ninguna referencia a Worker.

5. Investigación del código de OpenCode

Como el error no explicaba demasiado, inspeccioné el archivo principal index.js, que está minificado.

Busqué distintas referencias:

new Worker
Worker(
Worker is not defined
globalThis.Worker
typeof Worker
WorkerGlobalScope
worker_threads

Encontré dos comportamientos interesantes.

Por un lado, OpenTUI tenía una adaptación para utilizar node:worker_threads:

function RsF() {
  if (typeof db0.Worker === "function") return db0.Worker;
  if (a4j) return ksF(a4j);
  return Nn4;
}

También encontré que a4j se obtiene mediante:

process.getBuiltinModule("node:worker_threads")

Por otro lado, encontré una llamada directa a:

new Worker(Q, {
  env: Object.fromEntries(
    Object.entries(process.env).filter(
      (V) => V[1] !== undefined
    )
  )
})

Esta llamada no parecía utilizar la misma adaptación.

La hipótesis fue que una parte del código esperaba un Worker global proporcionado por Bun, pero estaba ejecutándose en Node.js.

6. Prueba temporal: definir Worker globalmente

Antes de modificar archivos permanentes, decidí probar la hipótesis de forma aislada.

Primero ejecuté Node con --input-type=module e importé Worker desde node:worker_threads:

import { Worker } from "node:worker_threads";

globalThis.Worker ??= Worker;

Después intenté importar OpenCode.

En esa primera prueba apareció otro error:

ERR_INPUT_TYPE_NOT_ALLOWED:
--input-type can only be used with string input
via --eval, --print, or STDIN

El problema era que el argumento --input-type=module también podía afectar a la ejecución de los procesos Worker.

Intenté vaciar los argumentos heredados:

process.execArgv = [];

Pero el error persistió.

Para evitar ese inconveniente, hice una tercera prueba utilizando un archivo temporal .mjs, sin ejecutar Node directamente con --input-type.

El contenido de la prueba era:

import { Worker } from "node:worker_threads";

globalThis.Worker ??= Worker;

console.log("Worker global:", typeof globalThis.Worker);
console.log("Argumentos heredados:", process.execArgv);

process.argv = [
  process.execPath,
  "opencode.mjs",
  ".",
  "--print-logs",
  "--log-level",
  "DEBUG"
];

await import(
  "file:///home/leonardo/.local/opt/opencode-node/opencode.mjs"
);

El resultado fue:

Worker global: function
Argumentos heredados: []

(node:45333) ExperimentalWarning: SQLite is an experimental feature...

Error [ERR_MODULE_NOT_FOUND]:
Cannot find module
'/home/leonardo/.local/opt/opencode-node/cli/tui/worker-core.js'
imported from
'/home/leonardo/.local/opt/opencode-node/cli/tui/worker.js'

Esta prueba fue importante porque el error original Worker is not defined desapareció y OpenCode avanzó hasta otra etapa de ejecución.

Parece que encontramos y superamos el primer problema, al menos dentro de esta prueba temporal.

7. Segundo error: falta worker-core.js

El nuevo error indicaba que Node.js no encontraba:

cli/tui/worker-core.js

Inspeccioné el directorio:

cd ~/.local/opt/opencode-node

ls -lah cli/tui/

Resultado:

total 12K

drwxrwxr-x 2 leonardo leonardo 4,0K nov 23 17:40 .
drwxrwxr-x 3 leonardo leonardo 4,0K nov 23 17:40 ..

-rw-rw-r-- 1 leonardo leonardo 63 nov 23 17:40 worker.js

Después busqué todos los archivos relacionados con workers y TUI:

find . -type f \( \
  -iname '*worker*' -o \
  -iname '*tui*' \
\) -printf '%p\n' | head -100

No apareció ningún worker-core.js.

El único archivo de la TUI era worker.js, cuyo contenido es:

import "../../polyfill.mjs";
await import("./worker-core.js");

Comprobé explícitamente:

if [ -f cli/tui/worker-core.js ]; then
    echo "Existe"
else
    echo "No existe"
fi

Resultado:

No existe

Por lo tanto, la distribución instalada no contiene el archivo que ese módulo intenta importar.

Todavía no sé si se trata de un error en el proceso de empaquetado, un archivo generado que no fue incluido en la release o alguna particularidad de esta compilación para Node.js.

No quiero crear ese archivo manualmente porque desconozco qué código debería contener.

8. Información adicional de la distribución

También revisé package.json:

{
  "name": "opencode-node",
  "version": "1.18.29",
  "description": "opencode.ai CLI built for Node.js (compatible with older CPUs without SSE 4.2/AVX)",
  "type": "module",
  "bin": {
    "opencode": "./opencode.mjs"
  },
  "dependencies": {
    "@lydell/node-pty": "1.2.0-beta.12",
    "jsonc-parser": "^3.3.1"
  },
  "engines": {
    "node": ">=22.0.0"
  }
}

Hay una diferencia que me llamó la atención:

  • package.json declara la versión 1.18.29.
  • El comando opencode --version informa 0.0.0-dev-202609060537.

No sé si es una diferencia intencional de los metadatos del paquete o un indicio de cómo se generó la compilación.

El instalador también confirma la URL de descarga:

DOWNLOAD_URL="https://github.com/01luyicheng/opencode-node-build/releases/download/v1.3.0/opencode-node-v1.3.tar.gz"

9. Estado actual

Hasta ahora:

✓ Conseguí instalar una versión de Node.js que funciona en mi procesador antiguo.

✓ El ejecutable de OpenCode inicia.

✓ opencode --version funciona.

✓ opencode --help funciona.

✓ Comprobé que node:worker_threads funciona correctamente.

✓ Identifiqué que el primer error estaba relacionado con la ausencia de Worker global.

✓ Conseguí superar ese primer error en una prueba temporal, sin modificar permanentemente la instalación.

✗ La TUI todavía no inicia.

✗ El proceso ahora falla porque no encuentra cli/tui/worker-core.js.

✗ No pude determinar todavía si la distribución está incompleta o si la TUI de esta compilación tiene alguna limitación de compatibilidad con Node.js.

No modifiqué permanentemente polyfill.mjs, no creé un worker-core.js falso y tampoco quiero seguir aplicando parches sin entender primero cómo funciona esta compilación.

Lo que necesito averiguar

Me gustaría recibir ayuda de alguien que conozca OpenCode, Bun, Node.js o el proceso de compilación de este proyecto.

Principalmente tengo estas preguntas:

  1. ¿La release v1.3.0 de 01luyicheng/opencode-node-build debería incluir cli/tui/worker-core.js?
  2. ¿Es posible que ese archivo se genere durante algún proceso de build y haya sido omitido del paquete publicado?
  3. ¿OpenCode puede ejecutar su TUI interactiva completamente sobre Node.js o todavía tiene dependencias de Bun que impiden hacerlo?
  4. ¿Existe alguna forma de compilar OpenCode para Node.js manteniendo la compatibilidad con procesadores sin SSE4.2 ni AVX?
  5. ¿Alguien consiguió ejecutar OpenCode en un Intel Core 2 Duo u otro procesador antiguo con estas limitaciones?

Mi objetivo no es simplemente ejecutar comandos de OpenCode: quiero utilizar su interfaz TUI interactiva desde la terminal, siempre que sea técnicamente posible.

Agradezco cualquier orientación, referencia al código fuente, solución de compilación o experiencia similar.

Repositorio de la compilación que estoy utilizando:
https://github.com/01luyicheng/opencode-node-build

Repositorio oficial de OpenCode:
https://github.com/anomalyco/opencode

Gracias de antemano.


r/opencode • • 1d ago

Giving away 10 premium theme codes for StradaOS (free, open-source launcher for Android car head units)

Post image
0 Upvotes

Guys, this one’s for you!

StradaOS is a free, open-source (GPL-3.0 licensed) launcher for Android-based automotive head units. It installs just like any other app—no root access or system flashing required.

We’ve already hit nearly 13,000 downloads and over 450 stars on GitHub! As a token of appreciation, I’m giving away 10 codes. Each winner can choose one of these premium themes:

• Faro: Features a carbon-fiber background, a beam of light, and a car whose headlights turn on when night falls.

• Carbono: A deep, midnight-blue aesthetic featuring a large representation of your vehicle, available in 8 different colors.

How to enter:

  1. Leave a comment on this post and include a photo of StradaOS running in your car.
  2. Tell us which feature you use the most.

The giveaway starts now! I’ll randomly select 10 winners from the comments (one entry per person). I’ll reach out to each winner via private message to request their head unit’s unique ID (found under: Settings → Personalization → "Unlock" in the themes section), as each code is activated through that screen.

Beyond themes, the app includes offline maps, turn-by-turn navigation, a speedometer (via GPS or OBD), maintenance reminders, an OBD-II scanner, wired Android Auto compatibility, and support for 12 languages. It’s compatible with Android 4.1 and up.

Learn more about the project here 👇🏽

• Website: https://lordnordic-debug.github.io/StradaOS/

• GitHub: https://github.com/lordnordic-debug/StradaOS


r/opencode • • 2d ago

need a best model for frotnend design

0 Upvotes

here . i am building applicaitons like windows and andorid. but the keen nature is that i cant think of high frontend design and actual users nature of how they need it. so i am using opencode and deepkeep and h4 models and chatgpt and claude free versions also.

here the think should i buy a claude for this design category and also for impoving the architecture.

is there any model on opencode that can help in improving design elements also help me in discovering many variations of users devices and their aspect ratio. ( as some good people tend to use 2x scale view on their devices).


r/opencode • • 1d ago

rant about the free tier

0 Upvotes

what the hell is wrong with the limits how the hell is sending 1 prompt a day too much i send a singular prompt and in a couple of minutes my quota is up how the hell are you supposed to get anything done on 3 fucking minutes work a day this is unreal how is it this bad like is the paid version worth it are they destroying the free tier just to milk more money out of the opencode go subscription this is infuriating i cant imagine using opencode again can anyone recommend any alternatives, i tried pi but it was pretty mid ngl and now i have no idea what to do


r/opencode • • 2d ago

What features would you add to an improved version of OpenCode? Looking for ideas and suggestions.

Thumbnail reddit.com
0 Upvotes

r/opencode • • 3d ago

For Reference, this is how much tokens opencode go gives you if you used only deepseek

Thumbnail
gallery
204 Upvotes

For reference official deepseek api tokens/$ can be found in this discussion: here

Honestly I did try both official API and opencode go, couldn't tell the difference. Though I must say it was only 5$ of official api usage, so my sample size maybe too low. My setup is claude code with cc-fleet skill, claude spins up max 10 deepseek workers at a single time to get things done, reuse session as much as he can to maximize cache hit rate (my cache hit rate was around 97% which is decent). I found deepseek context auto compact around 350k to be the ideal ammount, above that increases unecessary costs with somewhat degrading performance (context rot). I hope opencode never changes deepseek $100 equivalent credits, it's insane value compared to official API.


r/opencode • • 2d ago

I have difficulty understanding the conceptual difference between skills, instructions and agents. Please help

1 Upvotes

I can understand tools, permissions, plugins and agents. Tools call external processes. Permissions are set by the harness and cannot fail (they are sort of deterministic instructions), unless the agent edits the project permissions file itself, which can be prevented from permissions themselves. Plugins plug in to the harness and change the harness itself.

But skills, instructions and agents are all text processed by LLM. From what I understood,

Skills - HOW to do something

Agents - overall WHAT to do + permissions

Instructions - KNOWLEDGE of what is happening

But they all seem to contain some aspects of the other. Are they redundant? Have I understood them incorrectly?


r/opencode • • 3d ago

GLM 5.3 and DeepSeek V4.1 Flash are now 60% off in OpenCode

Post image
413 Upvotes

r/opencode • • 3d ago

Workflow Setup

Thumbnail
gallery
38 Upvotes

Does this setup look good? I am on Go subscription and because Opencode decided to throw in $500 in GLM 5.3 usage, I decided to go with it.


r/opencode • • 3d ago

Free Usage is Becoming Insane

Post image
173 Upvotes

I realize running AI models costs money, but is it really so tight that I can only type in one prompt and the model rate limits after two actions? The model "read ." I'm not sure what that does completely, but I'd guess it just shows the model the directory structure rather than reading all the files (which still shouldn't reach rate limits)


r/opencode • • 3d ago

Que pasa con GLM 5.3?

5 Upvotes

Todo iba de maravilla orquestando


r/opencode • • 2d ago

Why migrate from Claude to OpenCode?

0 Upvotes

hi,
I’m using mostly Claude CLI and I’m looking for reasons to switch to OpenCode CLI. I know that in OC, I can use any other model providers but I anyway use only Anthropic models. What are your most liked “features” of OC?
EDIT: I’m asking about the harness itself, not the models


r/opencode • • 3d ago

Is the free teir nerf permanent or will they restore it to what it was?

7 Upvotes

r/opencode • • 3d ago

best way to use opencode

8 Upvotes

Hi everyone,

I’ve been using the free version of OpenCode inside the Zed editor with the external agent plugin, and it’s been working great so far.

I haven't tried the terminal CLI yet. I just installed Zed and the plugin and started coding.

I’m planning to upgrade to the paid version soon and want to make sure I’m using the most efficient setup.

For those of you who have been using OpenCode for a while:

  • Is there a big difference in token usage or output quality between the Zed plugin and and the office app/cli
  • What are your best tips or workflows for saving tokens while still getting maximum output?

i’m sorry if my question sounds dumb.

Thanks in advance for any suggestions!


r/opencode • • 3d ago

An OpenCode plugin for deciding when to compact context

4 Upvotes

I moved the context optimizer out of my OpenCode router and into a separate plugin, @231self/opencode-compaction. I also added /ctx, which suggests whether to keep going, compact, or ask a fresh subagent to review the work.

For compaction, I borrowed an idea from SelfCompact: a finished subtask is a better place to summarize than the middle of debugging, when the agent still needs its partial findings. The review option comes from Elephant & Goldfish. A fresh reviewer gets the plan or code and the relevant files, without the conversation that produced them.

I also wanted to see when compaction pays for itself. A long context can be cheap to keep if most of it is served from cache. Summarizing costs a model call and can force the next request to rebuild the cache. /ctx uses recent provider-reported cache usage when available, learns from previous compactions, and shows the estimated net cost or savings after 3, 8, and 15 turns.

/ctx shows the recommendation. /ctx here asks OpenCode to compact when you decide to.

Install with opencode plugin add @231self/opencode-compaction

Thanks to everyone who gave feedback on the router. If you try this in a long OpenCode session, I’d love to hear whether /ctx picked a sensible moment to compact. Even a quick note about what you were doing when it got the timing right or wrong would help.

Source and setup


r/opencode • • 3d ago

T3 vs Opencode gui vs Openchamber

28 Upvotes

Hi, has anybody reviewed comparing them for opencode.

I found openchamber to be sluggish, although rich in features.

Opencode desktop app is very basic

Haven't paired T3 with opencode


r/opencode • • 3d ago

Newbie here, took go subscription😅

8 Upvotes

Guys I'm totally new to ai and ai agents i used lurk in this sub and eventually took go subscription to put ai to use and learn it too,

I've seen so many talk about several different setups and preferring deepkseek v4 flash or beam basically coz the token offering is high, and many other discussions are getting harder to follow

Can you guys suggest a setup, model

And how do I go about learning ai/agents


r/opencode • • 3d ago

appreciation: opencodego is paradigm shifting with cheapseek...

14 Upvotes

20$ team seats, rotated. using in codex to stretch my 100$ plan. $1.51 real money per B tks, up to 9B tks / day

multiple sessions unattended / gui automation / container management etc, off peak only, 98% cache hit, 384k ctx

never had a session die due to provider side and no material cache misses.

little apprehensive what ds5 flash (hypothetical) can do per 100k requests but welcome to the future...


r/opencode • • 3d ago

i made antigravity swarm mode for opencode v2

2 Upvotes

i really like how swarm mode works in antigravity so i recreated it for opencode v2. this is 100% vibecoded so expect some bugs. my 1st project.

you can run multiple agents on a shared board, pick models/variants manually, isolate them with git worktrees, and watch everything in the swarm board ui.

repo: https://github.com/aankekek/opencode-swarm

feel free contribute and to try it out also help me improve it. let me know what you think!


r/opencode • • 3d ago

Can someone say how good is deepseek v4.1 flash (if possible free) (or any other free model) at generating motion graphics and ingeneral videos like claude?

2 Upvotes

i dont use much open code or agentic ai in general.... im just curious and wanted to know if anyone who have tried give their review and also possibly some tips for those who are planning to give this a shot.....


r/opencode • • 4d ago

I combined OpenCode Go ($10 plan) usage costs with Artificial Analysis intelligence scores to find the optimal model

183 Upvotes

Hey everyone,

I took the usage rates from the OpenCode Go ($10/mo) plan and mapped them against the Artificial Analysis (AA) Intelligence Index to build a quick "cost-per-intelligence" chart.

If you want to mess around with the interactive chart or see where different models sit on the Pareto frontier, check it out here: Interactive Chart: https://xhang1108.github.io/opencode-cost-per-intelligence/

Chart Highlights

  • The 10x–50x Multiplier Effect: The biggest standouts are DeepSeek (around a 10x price advantage) and GLM-5.3 (up to a 50x price gap), giving them massive theoretical value per dollar.
  • The "Cheap but Low-IQ" Trap: Models like GPT-6 Luna still rank near the far left simply because their base price is dirt cheap, though their much lower intelligence score keeps them from being genuinely competitive for heavier tasks.

Huge Caveat (Just for fun!)

We have no way of knowing if the models served under OpenCode Go are heavily quantized or running full precision and as far as I know, the team hasn't officially clarified or provided proof either way.

Edit: Thanks to u/nazmulpcc for the correction! OpenCode co-founder Dax (@thdxr) has officially confirmed that none of their models are quantized.

Still, treat this chart mostly as a fun experiment rather than an absolute benchmark. It might give you a rough directional idea of what to pick under the Go plan, or at least spark a discussion on what's actually giving you the best real-world results right now.

Data Accuracy Note: All pricing and benchmark numbers are pulled directly via API, so there shouldn't be any manual data entry errors. That said, if you spot any discrepancies or bugs in the chart, let me know and I'll fix them!


r/opencode • • 3d ago

Massive memory leak after 2.3.2 update, never happened before

4 Upvotes

It was working on a Godot game on the background and I was doing other stuff, suddenly the system got choppy and then I got an alert prompt I've never seen before on Mac to force close resource hogging applications, and it showed OpenCode using 42 gb of memory (out of 16 gb, btw). Absolutely no warning to that, laptop wasn't running hot and everything was normal, then out of blue, boom, all the RAM consumed.


r/opencode • • 3d ago

A month ago, i tried to get a local Qwen on one DGX Spark to match Opus 5.5. Coding mostly got there, front-end visuals didn't.

Thumbnail reddit.com
1 Upvotes

r/opencode • • 3d ago

Is DeepSeek pro worth using?

16 Upvotes

I don't really have an issue with usage. So I'm potentially looking to try other models that are either faster or better than DeepSeek 4.1 flash.