How one person runs many AI agents at once: threads, memory and a decision queue
By ChabuLab. Published . 8 min read. Đọc bằng tiếng Việt
TL;DR
Work is split into master threads, one per area, and short-lived work threads under them. Shared rules, skills and notes live in one git repository, but most of them are only requests: some are loaded every session, some are read when the work matches, and only a hook can stop an action. Past sessions are searchable, and decisions only the owner can make go into one queue. The last section shows how to set up something similar in T3 Code, and why you should adapt it rather than copy it.
What problem does this setup solve?
ChabuLab is a small studio run by one person. The work is done by AI coding agents, often a dozen conversations at the same time. That creates three problems a single chat window does not have:
- Forgetting. A decision made on Monday in one conversation is unknown to the one that starts on Wednesday.
- Drift. Each agent invents its own conventions, so the same rule is followed in one repository and ignored in the next.
- Interruptions. If every agent stops to ask a question, the owner becomes the bottleneck of their own studio.
Everything below exists to remove one of those three.
How is the work split?
- A master thread is a long-lived conversation for one area, such as the web platform, browser tools, games or the agent setup itself. It is where an area is discussed before any work starts.
- A work thread is a short conversation inside one repository, with its own branch and its own proof that the change works.
- A child thread is a task a master hands out with a written brief. It shares no context window, so the brief carries the goal and an observable definition of done, the inputs as paths, the allowed scope one line per action, and what to hand back, including the commands that were run. Anything not listed is not allowed, so a missing permission fails safely. The next post tests what a brief should look like.
Threads are kept short on purpose, because every turn re-reads the whole conversation. When a thread reaches about 300 turns or 150,000 tokens of context, or the next job has nothing to do with the current one, the agent opens a fresh thread itself. It first saves what should last, then writes the handover into the new thread's first message: the goal, the current state, files and commit ids, open items, and what not to redo.
What happens when you send a prompt?
Rules written in a file only help if something makes the agent see them. Four mechanisms do that, and they differ in how sure you can be.
- Loaded every session (about 10 KB): the short file of standing rules, plus the name and one-line description of every skill. It is certain to be in the model's context.
- Read when the work matches. About twenty topic files (verification, web deploys, CI, choosing a model, games and so on) are listed in the always-on file with the kind of work each covers. The model reads one when it recognises that work. Nothing forces it to.
- Skills are small procedures, such as "prove a change with real code before you call it done". The model calls one when the request matches its description, or you type its name. That is a judgement call too.
- Hooks are scripts the tool runs before an action. They are the only mechanism that can stop one, and there are two: one guards a few standing rules, the other holds back edits to animation code until the agent has loaded the animation skill. The safety post covers them.
So a rule written in a file is a request. A rule with a hook behind it is a fact.
Where do rules and notes live?
In one git repository that every agent reads: the always-on file, the topic files, about twenty-five skills, and a set of standing preferences, each with its reason. The same text is used by every coding agent we run, so a rule changed once applies to all of them. Each project also keeps a catalog of what it contains, so an agent checks it before writing something that may already exist. Because it is git, a rule that turns out wrong is reverted like code.
How do agents remember past work?
Two layers, deliberately different:
- Raw history. Our own memory tool indexes every past session of the three coding agents we use, about 1,800 sessions so far, and a new message is searchable within seconds. Before an agent answers a question about earlier work, it searches that history and reads the session itself. A summary can be wrong; the transcript is what happened.
- Short notes. One line each, kept in the same tool: a decision, a rejected option, a recurring failure and its cause. A note is saved the same turn the conclusion appears. Notes point the way; they are never the source of truth for what happened.
We built the memory tool ourselves after the one we used before stalled agents for minutes while it rebuilt its index. It is built to run on macOS, Linux and Windows, and it only reads each agent's session files, never changes them.
How does the owner stay in charge without answering questions all day?
The default is that the agent decides, does the work, checks it and reports the outcome. The owner is interrupted only for:
- spending money, new accounts or registrations, legal text;
- sending or publishing anything to customers or other people;
- deleting or overwriting anything with no backup;
- a lasting product or business choice the code and earlier decisions cannot settle;
- something only a person can do, such as a login or a captcha.
Those items go into one queue with what each unlocks and what to tell the agent when it is done. The reason is plain: decisions said only in chat were lost, a price and a payment store among them. A reminder shows at the start of a session when something has waited more than three days.
How do you set up something similar?
Everything above runs in T3 Code, an open-source app (MIT licence) that drives the coding agents already installed and signed in on your computer, in one window, with the same threads on desktop, web and phone. It does not sell tokens; you use your own subscriptions. These are the steps we followed, as of November 2026. Check the official docs for anything that has moved since.
-
Install T3 Code. Download it from t3.codes/download, or use a package manager:
brew install --cask t3-codeon macOS,winget install T3Tools.T3Codeon Windows. We run the nightly build to get new features early; the stable build is the calmer place to start. -
Install and sign in to at least one coding agent, then turn it on in Settings → Providers. For Claude Code that is
claude auth login, for Codexcodex login. We use Claude Code for most of the work and OpenCode for the cheap worker in the next post. -
Choose a permission mode. New threads start in Full access, which runs commands and edits files without asking. Start with Supervised or Auto until you have git history, backups and a hook or two in place. We use full access because every change lands in git and the hooks block the few actions we never want.
-
Add each repository as a project. Open one long thread per area as its master thread, and start a short thread for each piece of work. For code changes, let the thread work in its own git worktree, so parallel threads never edit the same files.
-
Keep the rules in one git repository and point every agent at the same file. Claude Code reads
~/.claude/CLAUDE.mdand Codex reads~/.codex/AGENTS.md; we make both symbolic links to one file. OpenCode takes the same path in theinstructionslist of itsopencode.json. Keep that file short (ours is about 10 KB) and move the detail into topic files it names. -
Put the few rules that must never break into a hook. For Claude Code that is a
PreToolUsehook in~/.claude/settings.json: a small script that sees each command before it runs and can refuse it. Blocking force-push and committing.envfiles is a good first one. -
Give your own decisions one home. A plain list file or an issue tracker is enough, as long as every agent writes into it instead of leaving the question in chat.
-
Follow and steer the work from your phone. This is how the owner works most of the day. The agents keep running on the Mac at home, and the T3 Code phone app shows the same threads: read what an agent did, answer its question, approve a step or start a new thread, from anywhere, without carrying the laptop. The phone reaches the Mac through T3 Connect, or through a private network such as Tailscale; the remote access guide has the steps. Turn on device approval there, so a new phone or browser needs your OK before it can open your machine.
The catch: the Mac has to stay on, awake and unlocked the whole time. If it sleeps, every agent on it stops, and the jobs that drive other apps on the screen need an unlocked session. So keep it plugged in, stop it from sleeping (in the Energy settings, or with the built-in
caffeinatecommand), and accept that an unlocked computer is only safe in a place you trust.
Add the rest only when you feel the problem it solves: searchable memory once you catch yourself explaining old decisions again, a cheap worker once the main model's bill or limits start to hurt.
A word of advice. This setup fits one person who runs a dozen threads a day across many small projects. Copy the shape, not our rules. Your languages, budget, team size and how much you want to approve by hand should decide the details. Start with steps 1 to 4, add a rule only after the same problem happens twice, and delete any rule that does not earn its place. A rules file that grows without pruning becomes one more thing the agent half reads.
What are the limits of this setup?
- It is one person's setup. It will not transfer without editing.
- Most rules are requests. The model may skip a topic file or a skill; one gap stayed open for a while because only one of the agents in use loaded the notes automatically.
- Notes can go stale, so agents are told to check that a note still holds before acting on it.
- We have no controlled comparison with working without this setup, so we claim no speed-up, only what it removed: lost decisions, repeated explanations and repeated stops to ask.
What to take from it
You do not need this exact setup. Three ideas travel: write what every agent must know in one place under version control; make past work searchable instead of trusting summaries; and give decisions that only you can make one home. Then work out which of your rules need a hook, because the rest are only requests.