Skip to content

Jujutsu (jj) compatibility audit for worktrees and git plumbing #521

Closed

Description

@currentbits

Source: research round 26, demand-side. "Add support for jj SCM" is the top open agent-related request on zed-industries/zed (#21538, 57 comments), and jj adoption is concentrated in exactly the power-user crowd Solenta targets.

Solenta shells out to git for worktree creation, diffs, checkpoints, and the next-action chain (#489). jj is git-compatible in colocated mode (jj git init --colocate), so most plumbing should work, but there are known sharp edges to audit:

Scope: run the electron/test/worktrees.test.js fake-git harness against a colocated jj repo, document what breaks, and either fix the small stuff or detect jj and show a supported/unsupported badge per project. Explicit non-goal: native jj operation backend.

Activity

  1. currentbits commented on Aug 18, 2026

    @currentbits
    OwnerAuthor

    Round 27 corroboration: "Jujutsu Workspaces" is also a top request on Orca's tracker (stablyai/orca#1082), so both direct orchestrator competitors have jj demand on file. The audit scope in this issue stands; if the fixes turn out small, jj support is a cheap credibility win with the power-user crowd.

  2. added
    plan:doing
    and removed
    plan:todo
    on Aug 21, 2026
  3. currentbits commented on Aug 21, 2026

    @currentbits
    OwnerAuthor

    Audit (jj 0.44.0, colocated)

    Ran Solenta's real setupWorktree / diff / mergeWorktree / maybeCreateCheckpoint against jj git init --colocate (plus a synthetic .jj probe so CI does not need the binary).

    What still works

    • git worktree add -b creates a clean thread worktree. setupWorktree and diff behave like a plain git repo.
    • Bookmarks vs branches is milder than the issue feared. The next jj command imports the coder/… git branch as a bookmark (Done importing changes from the underlying Git repo.).
    • Checkpoints in the thread worktree keep their SHAs if the user only runs jj in the main checkout. The worktree is a git worktree with a .git file and no .jj; jj status inside it errors (There is no jj repo in ".").
    • Working-copy commit does not dirty git right after colocate: git HEAD stays on main, jj's empty @ sits on top and is not checked out.

    What breaks

    • Merge after any real jj command. jj describe / jj new detaches git HEAD (colocated model: HEAD tracks @-). mergeWorktree then throws. The error now names jj instead of a generic detached-HEAD line.
    • addProject used to git init a --no-colocate repo, planting an empty .git next to .jj so it looked colocated. That is now refused.
    • Same-checkout index.lock reproduces if jj status and git add hit the project folder together (4/12 collisions in a burst). Thread worktrees have their own index, so the agent path is mostly safe. No retry added — same family as Worktree creation failure must never silently run the agent in the main checkout #511, not unique to jj.
    • SHA-keyed checkpoints still break if jj rewrites the commit they point at. We did not see that from jj in the main checkout; it would happen if someone later colocate-enabled the worktree or ran a git-jj shim there.

    Product call (no native jj backend)

    Colocated jj is unsupported, not blocked: worktrees/diffs still run on git, the project is badged jj · unsupported (Environment, project scope menu, Edit project). Non-colocated jj cannot be added until jj git colocation enable.

  4. currentbits commented on Aug 22, 2026

    @currentbits
    OwnerAuthor

    Landed on main in the 2026-08-22 backlog merge (2d33d30..bf7c4dc, released as nightly nightly-202608220926-bf7c4dc).

    Evidence on main: electron/scm.js detectScm + jj-aware worktree plumbing

    The branch had been finished for a while but was never merged; verification after landing: typecheck clean, vite build ok, core 38/38, renderer 1468/1468, memory 204/204, electron 1848/1848.

  5. added
    plan:done
    and removed
    plan:doing
    on Aug 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    plan:done

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions