-
-
The coding agent that never forgets — open source (Apache-2.0), proven over 10,000 turns, O(n) session cost.
-
Real telemetry from one 84-call live session: the standard loop climbs to 84k tokens per call; JARVIS CODE stays bounded near 21k.
-
Live HUD at turn 8,757 of the 10,000-turn run: 58M cumulative input tokens vs 251,950M counterfactual for a standard loop. Zero /clear.
Inspiration
Ask anyone who codes with AI agents: the longer the session, the slower and more expensive it gets — until the context overflows and the agent dies mid-task, forgetting everything you built together.
We wanted the opposite. A coding agent that never forgets.
What it does
Call #26 of a live Minecraft-clone build, measured on the provider's own token meter: a standard agent loop resent 73k tokens. JARVIS CODE sent 13k. In a stress run, an unbounded loop burned 980K tokens in a single user turn — the standard baseline overflowed its 128k context and died; ours kept going. The same engine scored 34/34 (100%) on the Aider Polyglot benchmark (Python track), with GPT-5.5 under the hood.
How? A paradox: JARVIS CODE never forgets because it forgets correctly.
Instead of resending the whole history on every call, it files every tool output into an exact archive — pinned by SHA-256, recoverable byte-for-byte at any time — and hands the model a small frame: the current state, plus exactly how to get anything back. Nothing is summarized away. It is filed.
That turns the standard loop's quadratic cost into a flat one:
Standard loop — call k resends all k previous steps → session cost O(n²)
JARVIS CODE — call k is capped at a constant B → session cost O(n)
Input does not grow with work.
How we built it
One human, two AIs, zero trust. OpenAI Codex (GPT-5.x) implements, another AI judges, and they attack each other's conclusions until every claim survives reproduction from frozen logs. Rule #1: confidence is not evidence. 2,075 tests stand guard.
Challenges: the quadratic that wouldn't die
We bounded the cost. Then we watched a live run spend 110 consecutive calls re-reading files it had already read — an 84% re-read rate. The model wasn't broken. It was being rational: we had evicted its memory, so it re-read the world to get it back.
The quadratic doesn't die. It migrates — from token cost into model behavior. Cut an agent's memory, and it pays the O(n²) back in re-reads.
So forgetting correctly turned out to be the easy half. The hard half is deciding what an agent must never forget:
- What the code looks like. We engrave each file's public API into memory the agent cannot lose, so it can correctly call code it can no longer see.
- What it has decided. Conclusions evaporate — "that bug was already ruled out" — so answered questions get re-asked and dead hypotheses resurrect. We are building the carrier for this right now.
Honestly: we haven't beaten it yet. The latest runs still show re-reads. But we can measure it, reproduce it, and name exactly what's missing — which is how the first quadratic fell, too.
What we learned
Forgetting is easy. Forgetting selectively is the entire problem. Long-lived agents don't need bigger context windows; they need a memory architecture that knows what to carry.
What's next
Ship the conclusion carrier, then prove it at scale. The code (Apache-2.0), the paper ("Forgetting Is All You Need", on Zenodo), and the site are already public.
An agent that never forgets isn't one that keeps everything in context. It's one that files everything exactly, carries what matters, and can prove — byte for byte — that nothing was lost.
Built With
- codex
- gpt-5.5
- gpt-5.6
- node.js
- ollama
- openai
- pi-agent
- typescript
- vitest
Log in or sign up for Devpost to join the conversation.