NeuralCodeDOCS
Core workflow

Workspaces & worktrees

A workspace is one task. Each one is backed by its own git worktree on its own branch — the isolation that lets many agents run in parallel without collisions.

Creating a workspace#

Press ⌘⇧N, click the + next to a project, or start one from a GitHub issue. You give it a name, a base branch, and an optional task prompt for the agent.

New Workspace in 2xlabs

Name
fix-login-redirect
Base branch
main
Branch code-agents/fix-login-redirect from main, in a new worktree.
Task for the agent (optional)
Describe what Claude Code should do in this workspace…
CancelCreate Workspace
New Workspace — name the task, choose the base branch, and optionally seed the agent's first prompt.

On create, NeuralCode runs:

git worktree add -b <prefix>/<slug> <worktree_path> <base_branch>

…giving the workspace a fresh checkout and branch. If you wrote a task prompt, it's seeded into the chat ready to send.

Branch naming#

The branch is <prefix>/<slug>, where the slug is your workspace name lowercased and hyphenated. Two strategies are available in Settings → Git:

StrategyExample branch
Simple (default)code-agents/fix-login-redirect
ConventionalPick a type per workspace — feat/…, fix/…, chore/…, docs/…, refactor/…

If a branch name already exists, a short unique suffix is appended so the worktree always succeeds.

Workspace statuses#

Every workspace shows a status indicator in the sidebar and header. The running state animates as a braille spinner; the rest are colored dots.

IndicatorStatusMeaning
IdleCreated, but no agent run is active yet.
RunningAn agent run is actively streaming.
Ready to reviewThe run finished successfully — inspect the diff.
ErrorThe last run failed.
MergedThe branch has been merged into its base.
ArchivedRemoved from active lists; shown under History.

Merge, archive & delete#

Merge

Merging commits any pending changes in the worktree, then runs a git merge --no-ff of the workspace branch into its base branch in the original repo. The workspace is marked Merged (the worktree and branch are left in place so you can keep iterating).

Archive

Archiving stops any running agent and terminal, then removes the git worktree and branch. The workspace record is kept and moves to the History section of the sidebar. Merged work stays safely in the base branch.

Archive is destructive to the worktree
Archiving deletes the workspace's isolated checkout and branch. Make sure anything you want to keep has been merged or pushed first — the app confirms before archiving for exactly this reason.

Running in parallel#

Because every workspace is a separate worktree, you can have a fix, a feature, and a refactor all running at the same time. The sidebar shows each one's live status, and switching between them is instant — their chat, diff, terminal and review state are all preserved.