Mike Cann
2 days ago

Threads or coordinators? I asked the creator of Ghostex

I've been building Threadbear for a few weeks now, and Ghostex has been a massive inspiration for it. So I finally got to sit down with its creator, Mohamad Yahia, who goes by maddada online (and Yahia to pretty much everyone, it's his dad's name).

There was one big question I wanted to pick his brain on, which is coordinators versus threads (I posted some half-baked thoughts on it a little while back). Do you talk to your coding agents in lots of separate threads, one per piece of work, or do you talk to one coordinator agent per project that hands the work out for you? I'm still confused to some degree about which way Threadbear should go, and Yahia is all in on coordinators, so it was a great chance to hear the other side properly.

It's a long chat and we jump around a fair bit, so these are the bits I keep coming back to. I've tidied the ums and ahs out of his quotes, but the words are his. Let's take a look.

0:00 / 0:00

There are a LOT of these apps

I'll admit I thought I was a genius coming up with Threadbear, and then I saw Ghostex and realised this guy had done it ten times better. Yahia was quick to set me straight:

There's literally 5,000 or more of these ADEs.

(ADE being an agentic development environment, the new name for apps like these.) He's been at it for well over a year, through a lot of failed versions along the way, and he builds Ghostex using Ghostex itself. He prompts the agents while they work on the app, it reloads itself and he sees the change straight away:

I haven't seen a shorter dev feedback loop than what I have with Ghostex. You're actually using the tool as you're testing it as you are prompting.

The Ghostex repo on GitHub: MIT licensed, "Fully Rust & GPUI based", 1.8k stars and 144 forksThe Ghostex repo on GitHub: MIT licensed, "Fully Rust & GPUI based", 1.8k stars and 144 forks

By the way, the Ghostex website has an interactive version of the app right there on the page, which I absolutely love. When I asked if I could steal that idea for Threadbear his answer was "Man, steal whatever you want. It's MIT." He copied it from Kimi in the first place. As he put it, "nothing's original anymore."

Why not just threads?

Yahia opened his screen share with a little presentation his agent had made from his tweets and his README. The alternative to coordinators, he says, is "like a thousand threads" in your sidebar, where you don't know which chat has what. I jumped in with the obvious answer, that you can snooze, sleep or archive them, and he had that covered too. Ghostex has all of that, plus tags. His answer: it doesn't work.

All of us have this downloads folder that has a million things, and you never organise it. That's basically your threads.

With agents we're all jumping between things, he says, and organising is the most boring part, so nobody does it. He had two other problems with threads. Every thread hands you a wall of text at the end, and you become the router, working out which thread to send each prompt to because it already has the context. And sending a prompt to the wrong thread is the worst part, he says.

A slide from Yahia's presentation: "One PM Per Project. Peace of Mind.", showing the Ghostex sidebar with one coordinator row per projectA slide from Yahia's presentation: "One PM Per Project. Peace of Mind.", showing the Ghostex sidebar with one coordinator row per project

So instead he has a main hub (a chief of staff) and one coordinator per project, marked with a little crown. You talk to the coordinator and it spins up the worker threads, which then settle out of sight. One coordinator he's been running for close to two months has around 2,100 threads under it. Before that he was opening 50 or more threads a day by hand.

All of his agents work on main too, and as separate threads they'd step on each other's toes because they didn't know about each other. Now the coordinator tells one to wait for another to finish, or sends a conflicting prompt to the agent that's already working on that area:

Now I don't even need to do worktrees.

And if he sends a prompt to the wrong coordinator, it knows, and forwards it to the right one (or up to the chief of staff) by itself.

He only looks at pings and blocked

The coordinator keeps a very basic Linear-style board for itself of what's in progress, done, waiting or blocked. Yahia ignores almost all of it:

I just look at pings and blocked. This is what I care about.

A slide titled "Stop Reading Chat Logs. Work From Your Inbox.", showing an inbox of pings, blocked items and work in progress above the chat boxA slide titled "Stop Reading Chat Logs. Work From Your Inbox.", showing an inbox of pings, blocked items and work in progress above the chat box

He doesn't read the chat either:

Every time it puts any useful information in the chat, I tell it, let's edit the playbook so that you never send me something like this in the chat again.

His comparison was being the CEO of a company: you don't want to go and talk to each individual contributor, you just want to know what needs you.

"Show me a live page first"

A live page is just an HTML page, but the agent is taught to use it to ask you questions as visual choices. His example was a shared budgets feature in a demo app, where the agent came back with three invite designs (copy a link, invite by email, scan a code in person), each with a Pick button. There's always a box at the end to type your own notes too.

A slide titled "Pick Upfront. Never Debug Ugly UI Later.", zoomed in on a live page with three invite designs for a shared budget, each with a Pick buttonA slide titled "Pick Upfront. Never Debug Ugly UI Later.", zoomed in on a live page with three invite designs for a shared budget, each with a Pick button

He scrolls through, picks, picks, picks, and that's it. And he never lets the agent implement anything until he's seen it this way first:

Always hold the leash on the agent. Don't let them implement anything unless they show you first how they're going to implement it and give you the options, and then you pick, and you confirm.

0:00 / 0:00

That's how he's happy that Ghostex is completely agent-developed, even though he doesn't look at the code: "It's not slop." For him the part that really needs a human is taste, because "they don't understand how humans use software. They sometimes put buttons in weird places." His agents build the pages from a template rather than from scratch, which saves a lot of tokens, and each one shows which option is recommended. I actually stole that word for Threadbear. It used to say "my pick", and "recommended" is better.

The last slide of Yahia's presentation: "Be Human-in-the-Loop Only Where Your Taste Matters", with three rules: create 1 PM per project, demand live pages, live out of the inboxThe last slide of Yahia's presentation: "Be Human-in-the-Loop Only Where Your Taste Matters", with three rules: create 1 PM per project, demand live pages, live out of the inbox

The coordinator is just a messenger

The coordinator gets better the more you use it, because of its memory. He called it "AGENTS.md on steroids":

There are things that the agent learns when it's your coordinator for like two months. It becomes like you, but in AI form.

A slide titled "Why Coordinator Memory Beats Stuffing AGENTS.md", comparing shared instructions sent to every worker with a coordinator that passes each worker only what it needsA slide titled "Why Coordinator Memory Beats Stuffing AGENTS.md", comparing shared instructions sent to every worker with a coordinator that passes each worker only what it needs

Ghostex also has what he calls boosts, little reusable snippets you can save from any prompt and expand again later. They're like skills, but "skills are kind of a pain to manage across different agents".

And he says the coordinator itself is pretty simple:

The coordinator is nothing special. It's just a messenger.

It never blocks (he says you should replace any tool that stops the agent to ask you a question with your own), and it's never thinking about implementing anything itself. What makes it work is a handful of building blocks: an inbox and messaging so agents can talk to each other, a CLI so they can read each other's status and their last few messages (just the user messages and the turn-ending ones, never the tool calls), plus the playbook and the memory.

Because every prompt goes through that layer, he can be very lazy with them and the coordinator turns them into better prompts for the workers.

A slide titled "Your PM Prompts Workers 10x Better Than You", showing a coordinator handing a release brief out to worker threadsA slide titled "Your PM Prompts Workers 10x Better Than You", showing a coordinator handing a release brief out to worker threads

Switching models is the same, with no code involved. He just tells the coordinator once and it saves it to memory: use Neon for this, bring in a Neon advisor if Opus gets stuck on something complex, bring in Fable 5.2 to check security stuff. It'll even pick which of his machines to run things on, based on RAM and storage.

50 GitHub issues a day, down to zero

Then he flipped over to the Ghostex GitHub issues, with about 50 open:

I literally zero my issues every day. You see this 50, they're going to be zero by the end of the day because of the coordinator, because of the triage skill.

The open issues list on the maddada/Ghostex GitHub repo, most of them tagged feedbackThe open issues list on the maddada/Ghostex GitHub repo, most of them tagged feedback

A lot of those come in through the app itself. Users write their feedback and can click a button to have an agent collect more data from their machine, which goes straight to GitHub issues. Then his triage skill pulls all the issues and PRs into one page with a recommendation for each one. He goes through it and decides, using Wispr Flow to talk rather than type, and anything risky, or where he wants more say in the UX, gets a live page first.

This just brings in everything to one page. So I can just answer this page and go to sleep.

He releases every day, sometimes twice, where he used to release every three days, and he says it's only a few hours a day of work.

The GitHub release notes for Ghostex 12.3.0, covering coordinators, live pages, tools and extensionsThe GitHub release notes for Ghostex 12.3.0, covering coordinators, live pages, tools and extensions

The bit that made me go "wow" was the testing:

I only do E2E tests, by the way. I don't believe in unit anymore. Honestly, unit, integration, all of these, I'm over it.

Extensions vs forking

This is where we've gone about the same problem in really different ways. Ghostex has extensions: a repo where the community adds their own (seven of them when we spoke), plus a lot of first-party ones, including a full VS Code built right in. Most of them are toggles, and that's the point:

They're built-in toggles that when you click it, it just disables the feature, completely takes it out of all of the menus. That's what an extension is to me.

0:00 / 0:00

That way people can turn off what they don't use and the app doesn't feel bloated. He framed it as how omakase you want to go: either "I'm going to give you the experience", or VS Code's "do what you want".

Threadbear goes the other way. To be totally honest I'm being a bit selfish with it, I made it not really expecting anybody else to use it. So instead of extensions, everyone forks their own copy and changes whatever they like, which means I don't have to maintain an open source project with all the issues and pull requests that come with it. I watch the forks, and if fifteen people have fixed the same thing I pull it into mine so new people get it. It also means I can just rip out anything I'm not using.

Yahia isn't a fan:

With agentic dev, maybe forks used to work before, but now you can completely shift the whole app from, I don't know, Electron to GPUI. How can you expect people to keep up?

He doesn't recommend forking at all, and reckons it limits me too, since I can't change how something works within a day with 280-odd forks depending on me. My answer was that I limit releases to once a day, people pull them in when they want, and if something clashes with their changes they just have a discussion with their agent about it. He did tell me he took the idea for Ghostex's pills above the chat box from Threadbear's patches though.

Patches are also how the Convex dashboard ends up inside Threadbear. Threadbear syncs through your own Convex deployment, and any project that uses Convex automatically gets a Convex patch with the dashboard built straight in.

The Convex dashboard open in a patch panel beside a Threadbear threadThe Convex dashboard open in a patch panel beside a Threadbear thread

My rebuttal

Then it was my turn to share my screen. Coordinators in Threadbear are still an experiment (I'd only really started on them that day), and the way I think about them is a bit like a database. The chat is the write-ahead log, a stream of everything that happened, and I don't think you ever need to read it. The panel on the right is the materialized view of the project, which changes over time.

Threadbear's experimental coordinator view: the conversation is a stream of coordinator updates, with open loops and the project brief on the rightThreadbear's experimental coordinator view: the conversation is a stream of coordinator updates, with open loops and the project brief on the right

My big sticking point with coordinators is this: if you ask for something, then do 10, 20, 50 other things, how do you know whether that first thing actually got done? Yahia's answer was that it's in the changelog, or failing that, just ask the agent:

Just tell it, remind me, what did we start? What didn't complete? It's like literally you're trying to solve a UX problem that is very easy to solve.

His comparison was diet tracking. We used to take photos and type the calories into an app, and now you just tell the agent "I ate half a pizza".

I'm still not sure. With threads, I know what's waiting for me because it sits in the inbox, and the thread is the record of that task. When it's done I archive it and it's gone. To me coordinators should be "playing like sweeper", watching over everything and doing things proactively, while threads stay the context for each task. And starting a new piece of work with a coordinator means finding the right coordinator first, where right now I just hit Ctrl+N, paste a screenshot and ask my question.

0:00 / 0:00

Me and Yahia on the callMe and Yahia on the call

Yahia called himself "a threadaholic", with hundreds of threads in his sidebar at times, and for him the hard part was always the follow-ups:

Every thread, you have to ask it: did we finish our work? Did we finish our work? Did we finish our work?

With a coordinator, anything finished just drops out of what needs you, and when a new prompt is related to something recent, it wakes that thread up and sends it there. As he said, it's "similar to your librarian concept" (the librarian in Threadbear reads your threads in the background and files them into projects), "but in agent form that you can talk to."

I also showed him the comparison canvas in Threadbear, where options from the agent go on a canvas you can zoom around, with videos, audio and arrows pointing at things, more like FigJam.

0:00 / 0:00

His point was that a live page doesn't even have to be about choices, it can just be an explanation. And he does almost everything from his phone, so his live pages are responsive. He makes his picks in bed before he goes to sleep, and when he wakes up the release is out.

Conclusion

So just to recap: Yahia runs one coordinator per project, only looks at pings and blocked, makes every UI change go through a live page first, and between a triage skill and E2E tests he gets his issue count to zero every day. Like I said in the chat, I think we agree on the fundamentals, like the memory and the way the agents talk to each other, we've just gone about it in different ways. I'm still not sure about coordinators versus threads though.

Me, mid-thought, at the end of the callMe, mid-thought, at the end of the call

To end on a philosophical note: now that we have the power of AI and we can build anything we want, we've got this magic genie. Our question is now not what to build, it's what not to build.

If you want to try Ghostex, it's at ghostex.dev and on GitHub, and Threadbear is free at threadbear.mikecann.app.

Until next time, cheerio! 👋

All gas, no breakages

Convex is the reactive backend platform that keeps up with you and your agents. Database, functions, workflow, sync, search, file storage, and more. All TypeScript, zero glue.

Get started