In my article on how to work effectively with vibe coding, I suggest using two AI agents: one to analyse requirements and build the software, and another to review its work.
I use Codex as my developer and Antigravity as my auditor. The former is included in my ChatGPT subscription, while for the latter I use Google's free plan, which is quite generous.
When we work intensively on a project, we can easily hit the limits of these tools. If we want to stick to our development process, we have to stop work whenever the auditor is unavailable.
This has happened to me several times while developing features for this website, so I wanted to find a solution.
Looking for alternatives that wouldn't mean paying for another subscription, I've added two tools to my working environment: OpenCode and Qwen3-Coder, the latter running directly on my computer.
In this tutorial I'll explain how to configure the first, and in the next article, the second.
What OpenCode is and why use it for vibe coding
OpenCode is an open source development tool that uses artificial intelligence and lets us work from the terminal with models from different providers.
Unlike Codex or Claude Code, tools mainly tied to one company's models, OpenCode lets us choose from numerous alternatives, whether commercial, free or local.
We can use it for the same things as Codex and Claude Code: programming, analysing repositories, finding bugs, reviewing code and performing other routine software development tasks.
However, what interests me most about OpenCode for my workflow is the ability to configure an agent whose sole job is to audit Codex's work, without allowing it to modify files or execute commands.
I still use Antigravity first. OpenCode gives me a free fallback when I hit the token limit and have to wait for my quota to reset..
Which free model to use with OpenCode
The OpenCode application is free, but the models it runs on may or may not be. Some require a subscription, others use a paid API, and others are available free for certain periods.
At the time of writing, I'm using DeepSeek V4.1 Flash Free. Previously I've used Hy4 flash Free and several versions of Nemotron. None has disappointed me.
These free offers can change. OpenCode's advantage is that if a model becomes unavailable, we can replace it with another without changing anything in our working environment. We don't even need to open another terminal tab.
Now I'll explain how to set it up, bearing in mind that I use the CLI, meaning I work directly in the terminal.
Step 1. Install OpenCode on our computer
I'll start from the environment we set up in the tutorial on how to prepare your PC for vibe coding step by step.
In my case, I'm using Linux Mint, with Node.js and npm already installed.
We open a terminal and run:
npm install -g @opencode/cli
Once installed, we check that it works:
opencode --version
The version I used to set up and test this system is 2.4.1.
You can also find other installation methods on the official OpenCode website.
Step 2. Check the available models
We run:
opencode models
This command lets us check the identifiers of the available models.
If we want to find those containing the word free directly, we can use:
opencode models | grep -i free
In my case, the chosen model is identified as:
opencode/deepseek-v4.1-flash-free
We can run an initial test without configuring our auditor yet:
opencode run
--model opencode/deepseek-v4.1-flash-free
"Explica brevemente qué es una auditoría de código."
If we get a response, OpenCode is working and we can use the selected model.
Step 3. Create our auditor agent
If you've read my tutorial on supervised AI development, you'll know that I try to separate the developer's responsibilities from the auditor's.
I don't want the auditor to fix the code directly. I want it to identify problems, explain their consequences and propose solutions. The developer will then decide how to tackle them under our supervision.
To do that, we'll create a custom agent.
We run:
mkdir -p ~/.config/opencode/agents
nano ~/.config/opencode/agents/auditor.md
This file will be available to all our projects.
We enter a configuration like the following, adapted for OpenCode 2.x:
---
description: Auditor técnico independiente LOOP
mode: primary
permissions:
- action: "*"
resource: "*"
effect: deny
- action: read
resource: "*"
effect: allow
- action: glob
resource: "*"
effect: allow
- action: grep
resource: "*"
effect: allow
- action: read
resource: "*.env*"
effect: deny
- action: read
resource: "*wp-config.php"
effect: deny
- action: read
resource: "*.pem"
effect: deny
- action: read
resource: "*.key"
effect: deny
- action: read
resource: ".git/*"
effect: deny
- action: external_directory
resource: "*"
effect: deny
---
Eres un auditor técnico independiente.
Tu función es revisar los planes, el código y las evidencias elaboradas por otro desarrollador.
No debes modificar archivos ni ejecutar comandos.
Identifica defectos materiales, riesgos de seguridad,regresiones y problemas de integridad.
Distingue los problemas demostrados de las hipótesis y las mejoras opcionales.
Para cada hallazgo indica:
- Gravedad.
- Archivo y líneas.
- Evidencia.
- Impacto.
- Corrección recomendada.
- Prueba necesaria.
Emite un veredicto GO o NO-GO.
Si no dispones de evidencias suficientes para emitir un veredicto, indícalo expresamente.
No inventes pruebas ni afirmes haber ejecutado comandos que no has ejecutado.
Limita la revisión al alcance solicitado.
We save the file by pressing Ctrl + O, confirm with Enter and exit using Ctrl + X.
Why restrict the auditor's permissions
This configuration lets the auditor find, read and search files, but blocks file changes and command execution.
This has an important consequence: our auditor can perform static code reviews, but it cannot run the tests it's reviewing.
Therefore, Codex provides the results of a set of tests and OpenCode can check whether they are consistent with the submitted code, but it cannot reproduce those tests.
You can find more information in the documentation on OpenCode agents and the permission system.
VERY IMPORTANT: restricting permissions is no substitute for properly preparing the files we're going to share. The model runs in the cloud, so we must avoid including credentials, private configurations, personal data or any other confidential information.
Step 4 (optional). Create an alias to use OpenCode quickly
One thing I try to do with my vibe coding environment is minimise repetitive operations.
I don't want to have to remember an agent's name and a model identifier every time I need to carry out an audit. For that, I use an alias.
We open our Bash configuration file:
nano ~/.bashrc
We add the following at the end:
alias oc='opencode run --agent auditor --model opencode/deepseek-v4.1-flash-free'
We save the changes and run:
source ~/.bashrc
From now on, we can use our auditor simply by typing (notice that what I want to tell it goes in quotation marks):
oc 'Review this code and identify possible errors.'
That gives me three distinct commands in my usual environment:
| Command | Tool | Function |
| cx | Codex | Developer |
| agy | Antigravity | Primary auditor |
| oc | OpenCode | Alternative auditor |
Step 5. Integrate OpenCode into our development process
We don't need to change the system I described in the vibe coding development tutorial.
Codex still analyses requirements, proposes solutions, writes the code, runs the tests and documents the result.
The only thing that changes is the agent responsible for independent audits, which is temporarily no longer Antigravity because I've exhausted its tokens.
Here is how I organise the development workflow in practice:
- We define the requirements.
- Codex plans, develops and tests.
- Antigravity or OpenCode audits and gives a GO/NO-GO verdict.
- NO-GO: fix the issues. GO: wait for human approval before proceeding.
In my case, I ask Codex to prepare an audit package in a separate folder.
This package contains only the files needed for the review: requirements, code, differences from the previous version, test results and instructions for the auditor.
It's better to use extracted files. If our agent can't execute commands, it also won't be able to unzip a ZIP file or directly access the files inside it.
For example:
~/AI/auditor-test/mi-desarrollo/
├── AUDITAR.md
├── cambios.diff
├── resultados.txt
└── fuentes/
We navigate to the folder:
cd ~/AI/auditor-test/mi-desarrollo
And run our auditor:
oc 'Lee AUDITAR.md y revisa el desarrollo.
Identifica defectos materiales y emite GO o NO-GO.
Distingue errores demostrados de riesgos y mejoras
opcionales. Sé conciso.'
When OpenCode finishes, we pass its response to Codex so it can assess the findings.
Not every finding from the auditor has to result in code changes. Some will be real bugs, others risks we can accept and others improvement suggestions we don't need.
That decision is ours to make.
Step 6. Audit only what's necessary
Something I've learned from using this system is that we can consume a considerable number of tokens on unnecessarily extensive audits.
Imagine OpenCode finds two bugs in a WordPress plugin. Codex fixes both and prepares a new version.
Does it make sense to audit the entire plugin again?
Usually not.
We can ask Codex to prepare only the modified files, their differences and evidence from the new tests.
That's what I call a delta audit.
In that case, we can use a prompt like this:
oc 'Review only the changes made
to address the previous findings.
Check the fixes and the associated tests.
Do not review features that have already passed
unless the changes could affect them.
Return GO or NO-GO.'
This lets us reduce token consumption, speed up development and prevent every new audit from opening an endless list of improvements.
The goal is to build useful, reliable digital products without chasing theoretically perfect code. I build websites, not software for aircraft.
My experience using OpenCode on real projects
I've used OpenCode as an auditor while developing several of the custom plugins I use on Cultura Digital.
For example, I used it to implement automatic internal linking between articles in ten languages, with more than a thousand rules and a process for applying them in bulk to older content.
During development, OpenCode detected a major problem: if a run was interrupted and certain conditions changed, the system could become permanently stuck, with no way to start a new operation from WordPress.
In another review, OpenCode checked the system that temporarily pauses linking rules while another plugin modifies article content.
These issues can slip through if we only check that a feature works under normal conditions. Codex had missed both in its original implementation.
All of it using free access to an AI model.
I'll discuss this development in more detail in a future article, but if you're interested in how I organise this kind of development more generally, you can also read my tutorial on how to develop WordPress with vibe coding.
The limitations of OpenCode as a free auditor
OpenCode isn't foolproof.
First, we depend on free models remaining available. We can't guarantee that the model we use today will still be free in a few months.
Second, we need to critically assess the quality of its audits. Sometimes it may flag a situation as a problem even though it doesn't occur in our environment, or propose overly complex solutions for minor risks.
And third, our agent has access to a deliberately limited set of tools. It can't reproduce the tests performed by Codex or directly verify certain aspects of an application's behaviour.
For me, these limitations are more than acceptable, but we need to be aware of them.
Conclusion: a free alternative worth having set up
OpenCode has become my second choice for auditing AI-assisted development.
I still use Antigravity as my primary auditor, but when I exhaust its quota I can keep working without changing my development process or taking out another subscription.
Once OpenCode is set up, I can switch to another AI model without interrupting my work or changing my setup. At most, I need a new terminal tab.
And what if we also exhaust the free resources available in OpenCode?
In that case, we have a third free alternative: running an AI model directly on our computer.
That's what I explain in the next article in this series: how to set up Qwen3-Coder on your PC for vibe coding without relying on the cloud.
Frequently asked questions
Is OpenCode completely free?
The application is open-source and free. The cost of using it depends on the provider and AI model selected. Free models exist, although their availability and terms may change.
Can I use OpenCode to program instead of Codex?
Yes. OpenCode can act as a developer agent. In this tutorial, we configure it specifically as an independent auditor to separate the two responsibilities.
Do I need a powerful graphics card to use OpenCode?
Not if you use a cloud-hosted model. Processing takes place on the provider's servers.
Can OpenCode modify my code?
Yes, if it has the necessary permissions. With the auditor configuration proposed in this tutorial, we restrict its operations to inspecting files.
Can I use OpenCode with local AI models?
Yes. It can connect to compatible local servers. That allows you to use models such as Qwen without relying on an external provider, although you'll need a computer capable of running them.

Leave a Reply