DEV Community

Johannes Millan
Johannes Millan

Posted on

Why Multitasking With AI Coding Agents Breaks Down (And How I Fixed It)

AI coding agents are starting to feel like teammates.

You ask one to refactor a module.

Another to write tests.

A third to prototype a feature.

Individually, they’re powerful.

But the moment you try to run them in parallel, things get messy.

This article is about why that happens — and what I learned trying to fix it.


The Multitasking Problem

Running one AI coding session is simple.

Running three at the same time usually looks like this:

  • Three terminal windows
  • Multiple feature branches
  • Manual context switching
  • No clear overview of what each agent is doing

Technically, it works.

Cognitively, it doesn’t scale.

The friction appears in small ways:

  • You forget which terminal is working on which branch.
  • You accidentally reuse context.
  • You lose track of long-running operations.
  • You hesitate to spin up “just one more” agent because overhead increases.

The CLI gives you power — but no structure.


Why tmux (Alone) Isn’t Enough

You can improve layout with tools like tmux.

That helps visually.

But it doesn’t solve workflow structure:

  • You still manually create branches.
  • You still manage isolation.
  • You still need to remember which session owns which task.
  • You still lack higher-level organization.

Layout is not workflow.

And when working with AI agents, workflow matters more than layout.


The Key Insight

The breakthrough for me was this:

Each AI session should behave like an isolated feature branch — automatically.

Not just another terminal pane.

A structured environment.

If AI agents are “teammates,” then each one deserves:

  • Its own workspace
  • Its own git worktree
  • Clear visual boundaries
  • Easy creation and disposal

That reduces cognitive load dramatically.


Designing for Parallel AI Work

I started experimenting with a simple idea:

What if running multiple AI coding agents felt more like managing multiple feature branches in a visual workspace?

Instead of:


Terminal A
Terminal B
Terminal C

Enter fullscreen mode Exit fullscreen mode

You get:

  • Agent Session 1 → Feature branch + isolated worktree
  • Agent Session 2 → Separate branch + separate worktree
  • Agent Session 3 → Experimental sandbox

All visible at once.

All running natively.

No API wrappers.

No abstraction layers limiting features.


What I Built

To explore this idea, I built Parallel Code, a desktop app that:

  • Runs Claude Code, Codex, and Gemini CLI directly
  • Creates git worktrees automatically per session
  • Tiles multiple agent sessions in a structured UI
  • Keeps full CLI behavior intact

It doesn’t change how the agents work.

It just makes multitasking practical.

Repository:

https://github.com/johannesjo/parallel-code

(Insert GIF demo here)


What Changed in My Workflow

After switching to structured parallel sessions:

  • I hesitate less before spawning a new agent.
  • Experimental work feels safer.
  • Long-running refactors no longer block other tasks.
  • Context switching feels deliberate instead of chaotic.

The biggest difference isn’t speed.

It’s clarity.


The Bigger Question

Right now, most AI-assisted development assumes:

One agent. One terminal. One task.

But that might not reflect how we’ll work long-term.

If AI agents become real collaborators, we’ll need better ways to:

  • Run them in parallel
  • Isolate work safely
  • Maintain visibility across sessions
  • Reduce mental overhead

We may be in the “single-agent IDE” phase of a multi-agent future.


I’m Curious

If you’re using AI coding agents heavily:

  • Do you run multiple sessions in parallel?
  • How do you manage isolation?
  • Is terminal + tmux good enough?
  • Where does your workflow break down?

I’m still iterating on this idea, and I’d appreciate thoughtful feedback.

Top comments (1)

Collapse
 
johannesjo profile image
Johannes Millan •

What do you think about this? What is your setup to deal with this?