A model call ends. The project, the task it was in the middle of, the people it was talking with, and what it worked out should not end with it. DuoDuo is the environment an agent lives in: a durable body of files, a clock that keeps ticking, and doors to the outside world. And it learns, by an idea the rest of these pages build on.
Text gradients#
A model's weights are numbers, and training moves them by gradient: each step says which way a number should go so the next answer comes out better. DuoDuo cannot touch a model's weights, and does not need to. What it can change is text, the short board of intuition loaded into every session it starts. A few of the right words in that position steer a model as surely as a weight does.
So DuoDuo trains the words. Its days of work with you are the training data. Off the clock, its subconscious looks for the words that actually change what it does: a line that fired and helped, a line that should have fired and did not, a correction you made that no line saw coming. Each finding is a text gradient. It names the line, cites the events behind it, and says which way the line should move. The weaver applies them, so the board keeps the words with the most pull on behavior and drops the ones with none.
| Training a model | DuoDuo |
|---|---|
| Weights | The lines on the intuition board |
| Training data | Real work with you, from the event history |
| Loss | Did a line fire when it should, and did it help |
| Gradient | A text gradient: the line, the evidence, the direction |
| Update | The weaver adds, rewrites, reorders or retires a line |
A line on the board is a trigger and a direction: enough to fire at the right moment, with a pointer to the details. An opinion with no event behind it is not a gradient, so it never reaches the board, and a line nobody reads is measured and retired rather than left to take up room.
Because what it learns is words, it belongs to no single model and no single harness. A correction earned in a Claude session is on the board the next Codex job starts with. Weights would tie it to one model, and a harness's config to one harness. Subconscious & Intuition follows the pipeline step by step.
Four harnesses, one environment#
An agent is a model inside a harness, the loop that decides what the model sees and when it calls a tool. Claude Code, Codex, Grok and Pi are harnesses their makers ship and keep improving. DuoDuo runs all four whole, as peers, and does not build a fifth: their releases arrive with nothing to rebuild, and what each keeps for itself, such as Grok's native X search or your Pi extensions, comes along. A channel can answer on one while a job runs on another, against the same files.

Your plan follows the client. DuoDuo's Claude runtime embeds Anthropic's Agent SDK, so your Claude plan applies. Pi reimplements the loop instead, so Claude use through Pi is billed per token rather than against your plan. Codex and Grok run through the CLIs you already have, under your own login.
Their own instruction files stay yours. Claude Code reads CLAUDE.md, Codex and Pi read AGENTS.md, and DuoDuo leaves them alone. Your files say how a project wants to be worked on; the intuition board says what has held up while working on it, across every harness.
The filesystem is the body#
Everything DuoDuo does ends up in ordinary files on your machine: conversations, events, jobs, outputs, prompts, and the intuition layer. The filesystem is the database, and the daemon is a replaceable coordinator around that durable state.
Every incoming message is written to the append-only event history before execution. That history is the record of what happened: what you audit, what duoduo spine reads, what the subconscious learns from, and what the daemon rebuilds its routing from after a restart. The conversation itself continues from each runtime's own session state, kept beside it; the history is how you know what happened to that conversation.
One identity, many actors#
You meet one DuoDuo through the terminal, Feishu/Lark, an ACP-enabled editor, or a room you speak in. Inside the daemon, work is separated into actors with explicit ownership:
| Actor | What it owns |
|---|---|
| Foreground session | One continuing conversation attached to one workspace |
| Job session | One-shot or recurring work with its own schedule and delivery target |
| Subconscious partition | One bounded background responsibility, prompt, and schedule |
| Channel | Ingress, presentation, and delivery for one user surface |
Separating these actors keeps a busy channel, a scheduled job, and upkeep of the intuition layer from collapsing into one giant transcript.
Two cognitive loops#
The foreground cortex responds to live messages, reasons with whichever runtime the session is on, uses tools, and changes the project in front of you.
The background subconscious wakes on cadence without waiting for a message. Each partition owns one job: one reads new event evidence, one tends the intuition layer and dossiers, one watches for patterns that keep repeating, one commits what changed to the kernel's Git history.
The two loops meet through files. Every surface and every runtime writes to the same event history. The subconscious distills selected evidence from it, in order, into text gradients, lessons, and grooves, and every new foreground session starts with the compact intuition layer already loaded. What Claude worked out yesterday can shape what Codex starts with tomorrow, and the same holds in every other direction.
Code for what is certain, a model for what needs understanding#
DuoDuo's code does not decide anything on the agent's behalf. Where a question has an exact answer (whether an event was recorded, which day of history has no text gradients yet, whether a watched feed changed, how long a tool call has been open), the code turns that certainty into a tool and hands it over. duoduo spine reads the history. A lint measures the kernel's memory/ tree and posts a bounded signal into the inbox of the partition that owns the gap; the partition, not the lint, decides what to do about it. A watcher script calls duoduo session notify when data arrives, so no model turn is spent waiting. duoduo daemon status lists what is running and passes no judgment on it.
The rest needs understanding: what an exchange meant, whether a correction held, whether a line of intuition is earning its place, whether the person in the room was talking to it. The agent decides those with the tools in hand. The boundary is deliberate. Code is not asked to fake judgment with thresholds, and the agent is not asked to poll; the code's job is to make the certain parts cheap to reach.
How DuoDuo reads a conversation#
People add a detail while the answer is being worked out, cut in, change their minds, and talk about DuoDuo without talking to it. Forcing every message to produce one reply would misread all of that.
A follow-up sent while a session is working reaches the agent at its next tool boundary instead of waiting for the turn to end, and one reply can take several messages into account. In a room the judgment goes further: Ambient records everything said and answers only what was said to it. See Ambient.
What it learns is inspectable#
The subconscious stores what it learns as files: lessons, grooves, dossiers, and the intuition layer every new session starts with. The kernel is tracked in Git, so each change to what it has learned has a diff and a rollback path instead of disappearing inside model weights or a proprietary database.
Read Subconscious & Intuition for the full loop and its operating boundaries.
Who owns what#
| Layer | Responsibility |
|---|---|
| DuoDuo runtime | durability, routing, lifecycle, scheduling, delivery, and concurrency boundaries |
| The harness runtime | reasoning, planning, tool use, and project work |
| Filesystem kernel | the intuition layer and dossiers, prompts, configuration, subconscious partitions, and their history |
| Workspace | the actual project files the agent is reading and changing |