ChiChieh HuangFOUNDER · AI ENGINEER

Leading AI Through Long-Running Tasks 1 | From switching between thirty or forty tmux windows until I broke down, to tapping my phone and letting AI run 24 hours a day

Date2026.11.30
Length2,990 words
Reading~15 min
Figures4 figures
ChiChieh HuangFounder · AI engineer

Translated from the Chinese original · Read the original

LocatorLLM Plateau
2 wks
Overview

When I was playing with OpenClaw earlier this year, I spent a lot of time figuring out how to organize multiple agents. At first I tried having a single Orchestrator Agent coordinate everything, but it fell apart because messages got distorted as they passed through each layer. In the end I switched to leading a few heads directly, with one more layer dispatched under them, and let them talk to each other by mentioning one another. Then in September, when GPT-6 Astra had just come out, I had it lead a long-running algorithm research project. It turned out the model was still far too cautious on long tasks. Every report said something like “this stage isn’t proven yet, we haven’t achieved X yet,” and it kept burrowing into small details and going back and forth. After almost a month of that I really couldn’t take it anymore 🫠 Only when Claude Opus 5.5 came out, and I put Opus 5.5 in the lead and moved GPT to be the worker doing the execution, did long tasks actually start running continuously. Overall efficiency jumped way ahead.

Last time I shared that over the two weeks from 10/29 to 11/11, my AIs worked a combined 2,910 hours. I recently ran the same calculation for 11/15 to 11/28, and it came to 3,446 hours. I usually have thirty-some sessions open, on average 10 AIs are working at any given moment, and the peak was 53 at once. The longest-running one was a single session I kept using from 9/25 all the way to 11/29, a full 65 days.

Once the models could finally run for weeks on end, the bottleneck quickly shifted from “can the AI write it” to “how do I manage this crowd of AIs.” Every decision that needed my call piled up on me, and the AIs passing messages back and forth like crazy burned through tokens. So we built a small tool called desk to deal with this. It’s a little web page that runs on my computer and that I can also open directly on my phone. On one side it collects everything I need to decide into cards I can tap; on the other, it manages the org chart and the communication rules for this crowd of AIs.

Below is a screenshot of what desk ended up looking like. After that I’ll go through things in the order we actually lived them: how we first got the division of labor and verification stable right after switching to Opus 5.5, which two bottlenecks we hit once things were stable, and how desk finally brought the collaboration among these thirty-odd AIs under control.

One Opus leading about four lines of work is just right

When we first replaced GPT-6 Astra with Opus 5.5 in the lead, the structure we set up looked a lot like a manager with a few team leads. It’s actually very close to the “AI employee” idea people were playing with early on, except everything is focused on engineering. Day to day I only talk to a few Opus team leads. Each Opus session is responsible for a few lines of work, and the actual code writing and test running gets dispatched further down to Codex workers.

The main reason for the layers is that a single agent doing everything itself blows up its context very easily. Stuff a few thousand lines of debug log into the conversation and its attention gets diluted right away, and it starts forgetting the original goal. When the workers underneath digest all that noise in their own windows and only hand back a condensed result, the team lead’s head stays clean.

Even with layers, though, one Opus still can’t lead too much. Just like people, if it manages too many lines at once, things slip through the cracks. From what we’ve tried, Opus 5.5 is best at watching about four or five lines at the same time. Any more and the context of the different lines gets mixed up: it starts forgetting what we agreed on earlier, or comes back to ask the same question again. We used to go around in circles because of this all the time 😅

The lead Opus mainly does three things:

  • Break the work into small pieces and spell out what “done” looks like
  • Review what the workers hand back
  • Decide whether to merge, or escalate questions it can’t decide on its own

As for keeping a single session alive for weeks, auto-compacting when the conversation gets too long and writing handoff notes are already basic Claude Code capabilities. What we built on top is having every session wait in the background on standby, only waking up when someone replies or calls on it by name, so I don’t have to watch each one myself.

Verification standards: first write “what counts as done” as gates a machine can run

The precondition for daring to let thirty-odd AIs run on their own is that “done” can be checked by the system. I’ve talked before about this view: the stronger the model, the more its mistakes look right, and if you rely on human eyes alone, sooner or later things slip through. So we first set up four verification gates in our engineering workflow, turning the acceptance criteria in my head into a feedback loop that every change has to pass through.

The first is separating writing from reviewing. Whoever writes the code can’t review it; every change is reviewed by a separate, independent AI. Over these two weeks we were working on the core engine of the Cairn memory system. Review ran 634 rounds in total, and 60% of changes were sent back for fixes in the first round. The most common catches were forgetting-related problems, for example content a user had asked it to forget still getting sent out within some time gap. With this gate in place, we merged 581 PRs in these two weeks, and only 6 of them had to be reverted after merging because something broke (of course, plenty of small problems were fixed directly with a new PR, which doesn’t count as a revert).

The second is test reports that can be cross-checked. We don’t accept words like “all passed.” Every test report has to state clearly “ran N out of M,” and the total has to be counted again a different way for comparison. We locked this rule in after getting burned on 11/14: a report said all tests passed, and when we went back and counted, 356 of the 458 core test files had never run at all.

The third is a full run with a real client before every release. Test data we write ourselves can only prove the program matches our own assumptions. On 11/12 we had a 146-step acceptance suite that passed completely, but as soon as we hooked it up to a real Claude Code, it immediately caught two release-blocking problems. One was that the real client sends a few extra fields, so our program rejected everything and saved nothing, while the status still showed everything as normal.

The fourth is defining “done” as the point where users actually get it. New features are on by default, with a separate switch to turn them off, and progress reports now say “what users actually got.” Back on 11/8 I opened the work map for one of the lines and the whole thing said “not enabled yet.” That line had dispatched 94 workers in three days, and the change users could see was 0.

These four gates hold up “engineering execution with an objective right or wrong” pretty well, but these few rules alone aren’t really enough. How to design the CI, and how to keep these hundreds of PRs from rotting the architecture and piling up tech debt, has too many details, so I’ll go into that in the next post. This verification setup also has a clear boundary. Writing code, running tests and fixing bugs are things machines can verify themselves. But as soon as you hit a trade-off with no standard answer, like how to define the spec, what to do first, or whether this version ships, the verification system can’t help, and all of it ends up back on me.

The bottleneck became me

Once verification and layering were on track, after a week or two of running we noticed the whole team’s speed was starting to get stuck on me. When engineering execution can almost all run to completion automatically, what floats to the surface is every big and small decision that a person has to make.

I usually manage these AIs with tmux, and I easily end up with thirty or forty sessions open. That was before we had desk, so every day I was just switching between tmux windows, and often some session had been calling me for ages without me noticing. Along the way I also wrote a small tmux tool to try to keep up, but it still wasn’t nice to use. My brain simply couldn’t take it all in, and after asking, the AI could only sit there waiting, so the whole development pace got blocked too.

So we pulled everything that needs a human decision into one place, and that’s desk. Whenever Claude has something to ask me, it always goes to desk. Once it’s posted, the AI turns to work that isn’t affected, so its tasks don’t get stuck, and I only need to open one page to clear all the decisions in one go.

Message passing between AIs is expensive and drops things

Right after we consolidated the questions AIs bring to me, we hit another, bigger pothole: message passing between the AIs blew up.

I actually already knew that mentioning each other gets out of control easily. But during small-scale testing on OpenClaw earlier this year, a few agents pinging each other back and forth looked pretty smooth, so I kept thinking it was a great trick. This time Claude also has a built-in mention feature, and from the start I just let them run with it. Then the scale grew to thirty-some agents running for weeks on end, and things went wrong immediately. Once everyone is allowed to ping anyone, the number of communication paths grows quadratically, just like they always say in software engineering. Messages often lost the key points, the agents sent each other piles of fairly meaningless progress updates, and worse, every message woke the recipient up to reread its whole context. Even with caching offsetting some of it, the volume was staggering. On 11/21, desk woke up sessions about 1,460 times. On the highest day we measured, Claude alone read in more than 4.5 billion tokens in 24 hours, and Codex added nearly 3 billion more. By the way, I usually run this whole setup on about four US$200 subscription accounts (two Claude, two Codex). No matter how much the subscriptions absorb, once this pointless pinging and random waking explodes, it’s still too much. And with them passing messages back and forth underneath, from the outside I actually had no idea where things stood overall.

So we quickly added some organizational discipline. Each lead Claude manages its own people. The ones below don’t have private cross-team chats; for anything at all, they go to their own lead. Cross-line contact is limited to three formal channels: merging, touching production, and the official external interfaces. Ordinary progress all goes on the board and in the log, without tagging anyone. Only when something truly needs the other side to act right away do they use “@ID!” to wake them immediately; ordinary mentions are batched and sent every 20 minutes. This whole set of org and communication rules ended up living in desk as well, which helps manage them.

How desk actually works

Compared with switching windows one by one in tmux to keep an eye on progress, now that I have desk my daily routine is very simple:

  • Waiting on you: this is the page I open most. Anything an AI needs to ask me is organized into a card with the background, the options and its recommendation. I can reply on my phone by tapping an option, adding a sentence or pasting an image when needed, and the reply usually reaches the right session within a minute or two
  • Org chart and major projects: when I want the big picture I open the org chart and see at a glance what each session is doing right now and whether it’s stuck waiting on me. The few big streams of work are gathered in a major projects table, where each row is updated by the session responsible for it. When I really need to step in, I click through to see its recent conversation and jump straight in, and anything I’ve said is highlighted
  • Board, log, decisions: each line’s progress, the daily records, and the decisions I’ve made in the past all live here, so the same question doesn’t get asked again two days later

Seeing this many pages, a lot of people might wonder whether maintaining the tool is exhausting. It barely needs anyone to look after it, because desk grows directly out of things we were already using. Whenever a session starts work, a Claude Code startup hook automatically registers it in the org chart based on its folder and tmux window name. The conversation page reads the local conversation logs directly (strings that look like keys are masked automatically), and you can see right away who is or isn’t hooked up to the standby system. My phone connects in through Tailscale plus a pairing code.

Beyond being something for me to look at, desk’s more important role is actually as the company directory and internal rulebook for the AIs. Whenever a session is newly opened, or has just woken up from compaction, the same hook automatically sends it the latest org chart and communication rules, so it knows who it reports to, where to write its progress and what it’s allowed to do across lines, without being taught from scratch every time.

Results after using desk

We started using desk on 11/18. Looking at the records for the two weeks from 11/15 to 11/28:

  • The AIs asked me about 327 things, I answered 292 of them, and the median response time was 42 minutes
  • 106 of them were formal approvals, such as merging into main or going live
  • 50 formal decisions were recorded

Almost all of these 327 items were decisions about direction, strategy and technical approach, not me reviewing code on my phone 🤣 Code quality and testing are already handled by the verification gates described above. What reaches me are the multiple-choice questions where a person has to make the call on a trade-off.

Compared with the two weeks from 10/29 to 11/11, merged PRs went from 180 to 581, and the average number of AIs working at the same time went from 8.7 to 10.3. Of course this isn’t all thanks to desk. During this period we happened to be tearing apart and rebuilding the new core and building a new site, so the PR count was going to go up anyway.

For me personally, though, the change I feel most is how day-to-day work feels. Now I only need to handle the big-picture decisions. If there’s a problem, I talk to the head of that line and they pass it down themselves. Running things this way, the information flowing between the lines lines up better and better with the overall plan. Even when I’m busy outside and don’t have time to sit at my computer watching development, I can pull out my phone during a spare moment, open desk, tap a few times to clear the decisions, and the AIs underneath keep moving forward on the plan almost 24 hours a day.

This coming week’s experiments

This setup and its rules are still evolving. Most of the gates above still review things after the fact and send problems back. This week we started moving the pitfalls we hit most often one step earlier, writing them directly as automatic checks so the AI gets stopped the moment it makes the mistake:

  • On 11/30 we installed a pre-execution check that blocks three kinds of commands we’ve been burned by, such as using pkill -f to kill processes (on 11/23 a session killed itself that way 🤣). When it blocks one, it tells the AI the right way to do it
  • We turned “automatically figure out which tests this change should run” and “automatically check before merging whether anything was missed” into tools. For now they only report and don’t block; we’ll run them for a week and see whether the rate of changes sent back in review goes down
  • Once it’s live, we’ll take the forgetting-related problems review catches most often and turn them into a set of tests every change has to run

I’ll share the results in a week. This whole way of collaborating grew out of building Cairn, and we’ve packaged it as a Claude Code skill and open-sourced it on GitHub; the link is in the comments. Besides desk, it includes the script for dispatching Codex (keys are never handed to workers), the worktree conventions for dispatching work, templates for dispatching and reviewing, a pre-merge checklist, and a hard limit that escalates anything that has taken more than 3 rounds of fixes or been stuck for more than half a day. Once it’s installed, you just tell Claude to run things this way and it works. If you’re also leading multiple agents through long tasks, I’d really like to know how you handle the decisions that need a human call. Come share in the comments 🙌

End of the trail

2,990 words, and you made it to the end.

Newsletter

Get the next essay by email.

One email when a new essay goes up, nothing else. Unsubscribe in one click.

ChiChieh Huang
Surveyor

ChiChieh Huang

I build generative AI products and write about them, first in Chinese. Lately I’ve been researching agent memory and testing the ideas in Cairn.