Why your AI agents keep starting from zero
The problem is not only memory: without a contract, verification and closure, every session explores again and can declare victory without evidence.

An agent can know your rules and still close a task badly. It can read the architecture, inspect the right files and then claim it finished without exercising the affected behavior.
That is the reset that matters: not forgetting one piece of information, but improvising the working process again in every session.
Context does not replace control
Repository instructions solve a real part of the problem. AGENTS.md, folder rules and shared skills help different tools find the same standard.
But an instruction describes what must be respected. By itself, it does not guarantee that the agent will:
- declare the result it is going to deliver;
- turn that result into observable criteria;
- run the right test;
- fix the failure;
- close only when evidence exists.
Without that sequence, a session can accumulate context and still operate blindly.
Memory sustains the work. The loop decides whether the work is actually done.
The failure pattern
The cycle usually looks like this:
- the agent explores files without an exit condition;
- it finds a plausible implementation;
- it changes code;
- it runs partial validation or none at all;
- it summarizes its intention as if it were a result;
- the next session finds the failure and starts exploring again.
The bill is not only repeated tokens. It also appears as unnecessary diffs, regressions and human time spent reviewing claims that have no command behind them.
Externalize the loop
Cardumen turns that discipline into repository infrastructure.
1. Declare the result before code
C.R.E.A. forces a contract: deliverable, acceptance criteria and verification command. The idea stops living only inside the model's context window.
2. Verify with the real system
The agent does not evaluate itself. Authority comes from the test, build, browser or operational check that matches the modified surface.
3. Retry until green
A failure does not become a defensive paragraph. It becomes the next loop input: read the evidence, fix the cause and run again.
4. Split without losing the exit condition
For a large feature, cardumen run --tree preserves the global result and closes every leaf against evidence before moving on. Decomposition stops being a decorative list.
What changes for a local or cheaper model
A less expensive model does not need a promise of “intelligence”. It needs a narrower path:
- less directionless exploration;
- rules available before deciding;
- a concrete test at the end of every step;
- a mechanism that prevents premature success claims.
This does not make all models equal. It reduces the operational discipline each model has to invent internally.
How to test it without buying the story
Take a representative task and define two runs:
- same repository;
- same model;
- same prompt;
- one run with the harness and one without it;
- external judge: tests, build or adversarial review;
- record tokens, time, steps and failures.
One run does not demonstrate a trend. It can reveal whether the mechanism avoids a specific failure. Repeat, keep the bad cases and publish the limit alongside the result.
Limit
The harness does not fix a false specification or turn an incapable model into a capable one. It also depends on the repository having real signals: useful tests, maintained rules and reproducible commands.
The smallest — and most defensible — thesis is this: an explicit loop makes it harder to finish without evidence.
Un agente puede conocer tus reglas y aun así cerrar mal una tarea. Puede leer la arquitectura, recorrer los archivos correctos y luego afirmar que terminó sin haber ejecutado el comportamiento afectado.
Ese es el reinicio que importa: no olvidar un dato, sino volver a improvisar el proceso de trabajo en cada sesión.
El contexto no reemplaza el control
Las instrucciones de repositorio resuelven una parte real del problema.
AGENTS.md, reglas por carpeta y skills compartidas ayudan a que herramientas
distintas encuentren el mismo criterio.
Pero una instrucción describe qué debe respetarse. No garantiza por sí sola que el agente:
- declare qué resultado va a entregar;
- convierta ese resultado en criterios observables;
- ejecute la prueba adecuada;
- corrija el fallo;
- cierre solo cuando exista evidencia.
Sin esa secuencia, la sesión puede acumular contexto y seguir operando a ciegas.
La memoria sostiene el trabajo. El loop decide si el trabajo realmente quedó terminado.
El patrón de fallo
El ciclo suele verse así:
- el agente explora archivos sin una condición de salida;
- encuentra una implementación plausible;
- modifica código;
- ejecuta una validación parcial o ninguna;
- resume su intención como si fuera un resultado;
- la siguiente sesión descubre el fallo y vuelve a explorar.
La factura no viene solo de los tokens repetidos. También aparece en diffs innecesarios, regresiones y tiempo humano revisando afirmaciones que no tienen un comando detrás.
Externaliza el loop
Cardumen convierte esa disciplina en infraestructura del repositorio.
1. Declara el resultado antes del código
C.R.E.A. obliga a fijar un contrato: entregable, criterios de aceptación y comando de verificación. La idea deja de vivir únicamente dentro de la ventana de contexto del modelo.
2. Verifica con el sistema real
El agente no se evalúa a sí mismo. La autoridad es el test, el build, el navegador o el chequeo operativo que corresponda a la superficie modificada.
3. Reintenta hasta verde
Un fallo no se convierte en un párrafo defensivo. Se convierte en la siguiente entrada del loop: leer evidencia, corregir la causa y ejecutar otra vez.
4. Divide sin perder la condición de cierre
Para un feature grande, cardumen run --tree conserva el resultado global y
cierra cada hoja contra evidencia antes de avanzar. La descomposición deja de
ser una lista decorativa.
Qué cambia para un modelo local o barato
Un modelo menos costoso no necesita una promesa de “inteligencia”. Necesita un camino más estrecho:
- menos exploración sin rumbo;
- reglas disponibles antes de decidir;
- una prueba concreta al final de cada paso;
- un mecanismo que impida declarar éxito prematuramente.
Eso no vuelve iguales a todos los modelos. Reduce la cantidad de disciplina operativa que cada modelo debe inventar por dentro.
Cómo probarlo sin comprar el relato
Toma una tarea representativa y define dos corridas:
- mismo repositorio;
- mismo modelo;
- mismo prompt;
- una corrida con el harness y otra sin él;
- juez externo: tests, build o revisión adversarial;
- registro de tokens, tiempo, pasos y fallos.
Una sola corrida no demuestra una tendencia. Sí puede revelar si el mecanismo evita un fallo concreto. Repite, conserva los casos malos y publica el límite junto con el resultado.
Límite
El harness no corrige una especificación falsa ni convierte un modelo incapaz en uno competente. También depende de que el repositorio tenga señales reales: tests útiles, reglas mantenidas y comandos reproducibles.
La tesis más pequeña —y más defendible— es esta: un loop explícito hace más difícil terminar sin evidencia.
Traceability
Sources and scope
- Introducing Codex — OpenAI
Confirms the role of tests, linters and file citations as reviewable evidence of an agent's work.
- AGENTS.md — an open format for guiding agents
Supports versioned instructions close to the code for guiding different agents inside the same repository.
- Cardumen evidence
Documents Cardumen's on/off methodology, small samples and benchmark limits.
- Introducing Codex — OpenAI
Confirma el papel de pruebas, linters y citas de archivos como evidencia revisable del trabajo de un agente.
- AGENTS.md — un formato abierto para guiar agentes
Respalda el uso de instrucciones versionadas y cercanas al código para orientar agentes distintos dentro del mismo repositorio.
- Evidencia Cardumen
Documenta la metodología on/off, las muestras pequeñas y los límites de los benchmarks propios de Cardumen.