Blog · Story · · Hoa Trinh

One desktop per project: my macOS Spaces setup for Claude Code

My macOS Spaces setup for Claude Code is simple: one desktop per project. Claude Code runs in an iTerm2 tab for that project with its alerts on, and nothing happens on that desktop except that project. Chat and music live on a second screen that never changes. The rule that makes it work is the one I break most: I never browse on the desktop I am working on, and while a run goes, I only do what can be done right there.

Desktops, not windows

I have split my work by desktop for years, long before agents.

At home I use two monitors. The small one holds company chat and music, all day. The big one is for work, with several desktops on it, one per job. When I travel it is a single MacBook, and I still keep several desktops.

The point: switching to a project's desktop puts me back in that project, with nothing from another one in view.

What sits on a project's desktop

Most of my work now happens in iTerm2. I keep one tab per project, usually two to four at once. Sometimes it is a few worktrees of the same project, each on its own feature.

The loop on each one is the same:

  1. Hand Claude Code a task and let it work.
  2. Run /simplify and /code-review on the result.
  3. Smoke test by hand and read the diff myself.

iTerm2 alerts me per tab when Claude needs input or finishes. So noticing that a run ended is not the hard part.

The rule: the wait stays on the desktop

A run takes a few minutes. Never long enough to start something real, too long to watch a spinner. So the wait needs a job, and it has to be one I can do on the same desktop: reviewing the diff of the last run, or writing the next prompt.

Anything that is not this project goes somewhere else, and that "somewhere else" is the problem. Every leak I have comes from one move: a "quick" check of something in a browser on another desktop. By the time I come back, the agent has been waiting ten minutes. The alert arrived on time. I was three videos deep on another desktop and not ready to return.

Before this I had a Pomodoro timer on my desk, a Ticktime cube. I usually wear headphones, and half the time the cube had switched and I never noticed. A timer counts time. It does not know where I am. The end-of-run alert has the same blind spot, which I wrote about in Notifications tell you the run ended. Nothing tells you that you left.

Other people who use a Space per project

I am not the only one. Under a post about losing track of projects on one Mac, the author, who builds SpaceJump, described the same split:

What fixed it was simple: one desktop Space per project. Each Space holds only what that project needs. For me that's the terminal, a browser with the project's tabs, and the dev tools or design files.

Note the browser. They keep the project's tabs on the project's Space. That is a sensible choice, and a different one from mine. My browser is where the drift starts, so it stays off the working desktop.

In the same thread, u/dawedev, who also keeps one Space per project, added a trick I like:

The other thing that helped was keeping the agent terminal full screen on its project Space, so a quick look at Mission Control shows which project still has something running.

And when I described my setup in a thread about what to do while Claude Code is thinking, u/Coindef, who builds Waitroom, a set of Claude Code plugins for the wait, said the "quick" browser check is what kills it for them too. Then: "Separate desktop per project is a good trick though, might steal that."

When this setup is the wrong one

One desktop per project suits people who work on one thing at a time and switch between a handful of projects through the day. It is less useful if you work another way:

None of these is wrong. Mine is built around wanting one job at a time.

What the desktops make possible

Keeping each project on its own desktop has a side effect: the desktop I am on says what I am working on. That is the signal I built KeepGoing Den around, a macOS menu bar app I made for this setup.

You create a project from its folder and bind one or more desktops to it. Time on a bound desktop counts toward that project. So do file changes and Claude Code activity in the project's folder. No timer runs, and idle time is left out. The second screen with chat and music can be marked as ambient, so looking at it does not count as leaving.

During a focus session, if I leave the project's desktop for longer than a short dwell, that counts as a drift, and a small pixel pet in the corner of the screen nudges me once. It does not replace iTerm2's alerts; they still tell me the run ended. The pet covers the minutes before that, when I have already left.

One limit, said plainly: it only notices leaving the desktop. Open a browser on the project's own desktop and it sees nothing. One more reason I keep the browser off it.

Time per project and every drift are recorded for free. The nudge needs the licence, and the features page says what is free and what is not.

Try the setup without any app

You don't need an app for the core of it:

  1. Give each project its own desktop.
  2. Keep the agent's terminal on it, with your terminal's alerts on.
  3. Pick one or two jobs you can do on that desktop while a run goes.

Then watch which move takes you away. For me it is always the browser on another desktop, and knowing that is half the fix.

KeepGoing Den

One project per Desktop, and the Den times them for you, with no timer to start. Plus Focus breaks, posture nudges and a pixel pet that notices when you drift.