mohManual

Manual/Going further

Several tasks at once: lanes

Chapter 11 · 2 min read

Usually you work on one thing at a time in one folder. A lane gives a task its own copy of the project, so moh can work there without disturbing what you have open — and you can run several lanes side by side.

The idea

moh lanes list
group checkout-redesign → target develop
● active fix/payment-retry worktree ok · install ok
● ready feat/address-form worktree ok · install ok
● conflicted feat/coupon-field resolve to resume
One group of related lanes, each on its own branch, in its own folder.

Behind the scenes, each lane is a separate git worktree (a second working copy of the same repository) on its own branch, with its own installed dependencies. Lanes live in moh's folder, never inside your repository.

Using lanes

Inside moh, /lanes opens the lanes panel. From the terminal:

  1. Create a group for related work, and say which branch it lands on.
    $ moh lanes group checkout-redesign --target develop
  2. Start a lane for one task. moh creates the branch and the folder, and installs dependencies the way your project declares them — it never invents an install command.
    $ moh lanes start checkout-redesign fix/payment-retry
  3. Work in it. A conversation bound to a lane shows · lane and the task name at the bottom of the screen.
  4. Bring it back when you are ready.
    $ moh lanes integrate <lane-id>

When two changes disagree

If integrating a lane would clash with other work, moh stops the merge cleanly — nothing is left half-merged — and marks the lane conflicted. Sort out the disagreement (moh can help), then resume:

moh lanes resolve <lane-id>

Tidying up

CommandWhat it does
moh lanes listEvery lane and its health.
moh lanes abandon <id>Drop a lane: its folder and branch go away.
moh lanes cleanupShows lanes idle for a week with no unsaved changes; add --apply to remove them. Lanes with unsaved work are never touched.

When to use lanes

Reach for a lane when a task will take a while and you want your main folder free — or when you want moh to work on two independent things at once. For a quick fix, a normal conversation is simpler.

Written for moh 0.61. Inside moh, ctrl+h opens the built-in manual for your exact version.