Show HN: ChatML - Run Claude Code Parallel Sessions in a Desktop app

Hey HN,

Over the past 10 months I've been using Claude Code heavily, and one limitation kept coming up: you can really only run one coding agent at a time.

While one agent is refactoring something, the rest of the repo is basically blocked unless you start manually juggling branches and working directories.

The core issue is that AI coding agents operate directly in your filesystem. If two agents run in the same working directory they quickly start stepping on each other’s changes.

Git worktrees turned out to be a surprisingly good primitive for solving this.

So I built ChatML, a Desktop app that runs multiple Claude Code sessions in parallel, each isolated in its own git worktree.

Each task gets its own branch, working directory and runs Claude Code session using Agent SDK

That lets one agent write tests while another builds a feature or investigates a bug — all in the same repo without conflicts.

We ended up building most of ChatML itself using this workflow and merged 750+ pull requests generated through parallel agent sessions. That experiment convinced me the model actually works.

More about that experience building here: https://chatml.com/blog/we-built-entire-product-with-ai-750-...

GitHub https://github.com/chatml/chatml

Website https://chatml.com

The project is open source and currently macOS-focused.

I’d especially appreciate help from anyone interested in bringing it to Windows and Linux. If you’ve worked on cross-platform desktop apps, packaging, or filesystem/watchers issues across platforms, contributions or advice would be very welcome. We have it running but with a few bugs.

For context, I previously co-founded KnowBe4, now co-founder of ReadingMinds.ai and for the past few years have explored developer tools around AI-assisted software engineering. Our engineers in several companies I am involved with are using ChatML and we have received great feedback, bugs and security issues.

Happy to answer questions about the architecture, the git worktree model, or how parallel agent workflows feel in practice.

I am using this tool for ALL of my development, and I am happy to share with the community.

-Marcio

github.com

4 points

mcastilho

19 hours ago


12 comments

malshe 3 hours ago

What's the advantage over just using claude --worktree? (https://code.claude.com/docs/en/common-workflows)

  • mcastilho 2 hours ago

    claude --worktree is great for isolating a single session, but you're still juggling terminal tabs manually — starting each one, switching between them to check progress, reviewing diffs by hand.

    ChatML is basically the management layer on top of that. You get a dashboard where you can run 3-5 agents at once, each in its own worktree, and see what they're all doing without tab-switching. It also handles the worktree lifecycle for you (creation, branching, cleanup), has a built-in diff viewer with code review, tracks cost per session, and lets you open PRs directly.

    Closest analogy: running containers manually vs. having Compose manage them. Same underlying primitive, but the orchestration matters once you're doing it regularly.

    • malshe 2 hours ago

      Got it. I will try it out.

mekaoro 7 hours ago

Okay this is very cool, Had the same issue, will definitely give it a try.

  • mcastilho 5 hours ago

    That's awesome. Let me know if you have any questions setting it up.

rafaelkona 19 hours ago

Marcio, this is genuinely brilliant. The git worktree idea is one of those "why didn't anyone do this sooner" moments. Love that you dogfooded it hard enough to merge 750+ PRs... that's the best proof of concept possible. Rooting for this one!

  • mcastilho 19 hours ago

    Yes. In November/December timeframe when Opus 4.5 came out, I realized I was trusting it to write the code. I was doing light reviews. I had tried a few MacOS products that does this orchestration, but I was needing more and they weren't answering my emails.

    It was then I realized I had to build ChatML. The first commit was on January 17, so it took about 45 days to get this out, so people can use...

    One weekend I closed 120 PR's with on average 10-15 Worktree sessions at any given time. The hardest was to learn how to context-switch in your mind. I built some MacOS Notifications and audible alerts to catch my attention when new plan was proposed in a session, an agent asking questions, etc....

    It worked really well for ChatML, since I developed ChatML with ChatML. 750+ Pull Request done 100% by AI.

h4mp3r 7 hours ago

have mostly been using the vscode extension but this looks cool. if you're testing ui changes do you spin up a different process for each worktree to test changes?

  • mcastilho 5 hours ago

    Yes. Each session get it's up to 5 Terminal sessions. So if I want to test a particular session I was just spinning servers for that session. I had to prepare the code in development to attempt to use multiple ports in case we had another session running.... But I had no problems.... I am writing a feature that you can configure init and tear tasks, so you can do things like "npm install", "docker-compose up", etc.... I had it working, but needed more test, so I commented out from the initial release. I will be adding that shortly after some more testing.

nwyin 13 hours ago

very cool! I had a similar idea a few weeks back and built something much smaller scoped and shaped to my personal idiosyncrasies. my approach was giving claude a CLI interface to manage worktrees and spin up other claude instances to work in them, but have all the orchestration handled via a daemon rather than trying to prompt claude to do everything.

chatml looks very polished and promising. good luck with the project and hope it succeeds.

  • mcastilho 12 hours ago

    Thanks. Let me know what you think.