ClaudeMap

work3

One command per branch: work3 creates a fully set up git worktree — dependencies installed, secrets copied — and starts a Claude Code session inside it, so parallel agents never collide

SDKs & Toolingworktreeparallel agentsclibunnpmdeveloper tooling

work3 manages the worktree workflow for parallel agentic coding. Two agents in the same checkout overwrite each other's files; plain git worktree fixes that but leaves you reinstalling dependencies, copying .env files, inventing folder names and cleaning stale trees by hand, for every branch, every day. work3 open <branch> creates the worktree, runs the initialize tasks declared in the repository's worktree.json (bun ci, cp $WORK3_ROOT/.env .env — whatever you configure), then starts claude --remote-control <repo>/<branch> inside it, so each parallel session is distinguishable by name; reopening an existing worktree skips the tasks. Tasks run through Bun Shell, so built-ins such as cp, rm, mkdir behave the same on Windows, macOS and Linux, with WORK3_ROOT, WORK3_PATH and WORK3_BRANCH in scope. work3 ls reports clean, dirty or missing worktrees; work3 rm refuses to delete uncommitted work and never runs destroy tasks on a worktree it will not remove; work3 fold lands a finished branch on base by fast-forward only — no merge commits, no rebases, no pushes — and refuses a branch that is not a fast-forward with a pointer to rebase inside the worktree. The config is worktree.json (or .yaml/.yml) at the repository root, committed so the whole team shares the same workflow. Git is the only source of truth: there is no hidden state, and every command works from the main checkout or from inside any worktree. Requires Bun 1.2.21 or newer, git, and Claude Code on PATH unless you always pass --no-claude. Distributed as the scoped npm package @svara/work3; the command is work3.

What it does

  • work3 open <branch> creates the worktree, runs the repository's initialize tasks and starts Claude Code with Remote Control named <repo>/<branch>, or reopens an existing tree with the tasks skipped
  • Setup lives in a committed worktree.json — initialize and destroy task lists — so every teammate gets the same augmented workflow; tasks run through Bun Shell with WORK3_ROOT, WORK3_PATH and WORK3_BRANCH in scope
  • Safe teardown: rm refuses uncommitted or untracked changes and never runs destroy tasks on a worktree it will not remove; fold lands branches fast-forward-only, refusing merge histories with a pointer to rebase inside the worktree
  • No hidden state: git is the only source of truth, worktree folders are named after the branch (feat/login becomes worktrees/feat--login), and every command works from the main checkout or from inside any worktree
  • Cross-platform by construction: the same cp $WORK3_ROOT/.env .env task runs on Windows, macOS and Linux; releases are automatic from Conventional Commits and published to npm as @svara/work3

When to use it

Use when several Claude Code sessions must work the same repository at once — one agent per feature branch, each with dependencies installed and secrets in place, on a machine you do not want covered in half-configured trees. Skip it for single-branch work or if your team will not share the worktree convention: its value is the committed, shared per-repository config.

Getting started

Requires Bun 1.2.21 or newer, git, and Claude Code on your PATH (unless you always pass --no-claude):

bun add -g @svara/work3
work3 --help

Or run it without installing: bunx @svara/work3 open feat/login

Then, once per repository:

cd my-project
work3 init               # writes worktree.json and ignores /worktrees/
work3 open feat/login    # create, set up and start claude
work3 ls                 # see all worktrees and their status
work3 fold feat/login -rd  # fast-forward main, remove worktree and branch
work3 rm feat/login -d   # or discard: run destroy tasks, remove worktree and branch

Things to know

work3 never fetches: base "main" means your local main — use --from origin/main for the remote one. Tools in the main checkout (tsc, eslint, test runners, IDE indexers) may scan the worktrees/ folder; the README suggests excluding it in their configs or moving location outside the repository. remove refuses dirty worktrees unless forced, and fold is fast-forward-only by design — a diverged branch needs a rebase inside the worktree first. Sessions are launched with Claude Code Remote Control so they can be steered from the phone; pass --no-claude if you only want the worktree. MIT. 31 stars as of writing (2026-11-20).

Repository

svaraborut/work3

Charted

Related on the map

  • The open Agent Skills standard — SKILL.md folders any agent can load, governed by the Agentic AI Foundation since 2026-10-22.

    • official
    • spec
    • agent-skills
    • standard
  • Harness Bridge

    SDK / Tool

    A local launcher that points Claude Code and seven other coding harnesses at any OpenAI-, Anthropic- or Responses-compatible endpoint — without editing a single config file.

    • launcher
    • local-models
    • cli
    • menu-bar
  • Claude for Siri

    SDK / Tool

    Answers macOS Spotlight and Siri prompts with your signed-in Claude Code account — an experimental macOS 27 model-delegation provider.

    • macos
    • siri
    • spotlight
    • model-delegation