Skip to content

Handle moved/renamed base repos and repair existing workspaces #17

@0xferrous

Description

@0xferrous

Today, repo identity is derived from the path relative to base_repo_dir, and workspace paths mirror that relative path. This works while repos stay in
place, but breaks if a source repo is renamed or moved.

Problem:

  • existing workspaces remain tied to the old relative repo path
  • discovery sees the moved repo as a different repo identity
  • existing Git worktrees break because their metadata points at the old source repo path
  • existing JJ workspaces also break when the source repo moves

We should support both proactive renames/moves and retrospective repair.

Proposed direction:

  • add a builtin repo rename/move flow that:
    • moves the source repo under base_repo_dir
    • moves the corresponding workspace directories under workspace_dir
    • repairs Git worktree metadata
    • repairs JJ workspace metadata
    • updates agent-box’s view of the repo to the new relative path
  • add a repo repair flow for after-the-fact moves/renames, where the source repo has already moved and the managed workspaces need to be
    repaired/relinked

Suggested commands:

  • ab repo rename
  • ab repo repair

This keeps the initial scope focused on repo-level operations rather than introducing per-workspace repair commands up front.

This issue tracks designing and implementing first-class support for moved/renamed repos instead of treating them as entirely new repos.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions