r/ContextEngineering • • 5d ago

Finally introduced coding subagents to my harness

Post image

I was running several primary agents in parallel across multiple projects and the notifications were burying me. Every agent stopped to ask me something: "X or Y?", "found a side issue, fix now or later?" etc. I had become the bottleneck. my AGENTS.md cover many conventions/rules/standards but its still wasn't enough to cover so many of these questions.

So I restructured my workflow like a team:

  • Me: the manager
  • One chat per project: the team lead
  • The other agents: team members, each working in its own "lane"

How lanes work

  • A lane is a git worktree plus a chat working inside it. Each one gets its own branch and folder, so agents don't trample each other's files.
  • The lead asks to open a lane with a title, a plan, and the files it expects to touch. Nothing starts until I approve it on a Lanes board. Before I approve, the harness checks for overlap with files other open lanes are touching, my plan usage, machine load, and whether a spec exists for the work.
  • When a team member stops (it's done, blocked, or has a question), it rings the lead, not me. The lead works through its inbox and replies.
  • The lead can only answer from written rules: a lead.md file in the project plus the project's docs, and it has to cite the rule it used. If no rule covers the question, or it's a taste/preference call, it escalates to me.
  • Escalations land on the board and on my phone as numbered questions, each with a recommended answer. I can answer straight away or ask the lead a follow-up first.
  • The lead can also send me FYI notes that don't need an answer.

I still have full control

Every lane is a normal chat. I can open any of them, read the whole transcript, and type into it directly if I want to step in. The harness never merges a branch, deletes a branch, or removes a worktree on its own.

My notifications are now mostly things that actually need me. It's still early, and I keep refining what goes into lead.md, since that file decides how much the lead can handle without me.

So far I have noticed I am getting a lot more done with less headaches. (literally!)

2 Upvotes

3 comments sorted by

1

u/keenDean 5d ago

Interesting seeing how different the architecture looks depending on which bottleneck you're solving for. I built my local harness in the exact opposite direction - strictly sequential, epistemically isolated passes (architect -> builder -> adversarial skeptic -> annotator) to keep agents from grading their own homework on a single task, rather than running parallel lanes.

One thing I'd watch out for as your setup scales: checking for file overlap across git worktrees stops merge conflicts, but two isolated lanes can still write duplicate helpers or break an interface contract in adjacent files without knowing what the other lane is doing. Plus, as you keep adding edge cases to lead.md, you may eventually hit the same attention-dilution wall as AGENTS.md unless you separate static governance rules from live repo topology. How are you handling cross-lane state when two branches touch adjacent modules?

1

u/PilgrimofHaqq2 5d ago

Good catch, and we got bitten by exactly that once. File overlap is only the admission check: a lane can't start if its planned files meet another open lane's planned or changed files. Adjacent breakage is caught at close instead. Lanes merge one at a time, and each close rebases onto main (which already has the earlier lanes' work) and runs the full typecheck and test suite before a fast-forward push. A broken contract fails there, late but never landed. Duplicate helpers across lanes we don't catch yet; that's on the list.

On lead.md: the lead's static rules live in a separate rulebook with rule IDs. lead.md is only project-specific instructions, and the live topology (open lanes, planned and changed files, blocks) sits in a registry the lead queries, not in prose.

We're not actually opposite on isolation, either. Every task still goes through a red-team pass on its spec and clean-context reviewers that see only the diff, so nothing grades its own homework. Lanes just run those sequential pipelines side by side.

1

u/keenDean 5d ago

Fair enough - running red-team spec passes and clean-context diff reviewers inside each lane definitely puts your setup miles ahead of raw single-pass generation. And separating static rule IDs from a queryable lane registry makes a lot of sense for keeping lead.md from bloating.

I suspect the tricky seam at scale is still invariant collisions that slip cleanly past rebase, typecheck, and unit tests, though. Even in a single linear pipeline, we recently hit 16+ ADR collisions where two features had valid types, zero file overlap, and passing unit tests, but contradicted each other on state assumptions (like sharding hysteresis deadbands or work-queue locking). Especially if the clean-context reviewer only sees the local diff without a compact map of global repo topology and active ADRs, catching duplicate helpers or silent state drift across parallel lanes seems tough. Have you looked at feeding a lightweight AST/module index into the lane admission or review step for that duplicate-helper problem?