Skip to content

make setup and git hooks fail in linked worktrees: 'this operation must be run in a work tree', empty repo-root in hook paths #10352

Closed

Description

@kodjima33

In a linked git worktree (e.g. Conductor workspace at ~/conductor/workspaces/omi/<name> whose gitdir lives under the main clone's .git/worktrees/), both make setup (setup-hooks step) and the installed pre-push hook fail:

fatal: this operation must be run in a work tree
bash: /scripts/dev-harness/_resolve_python.sh: No such file or directory
bash: dev_harness_python: command not found
make: *** [setup-hooks] Error 128

The empty prefix in /scripts/dev-harness/... shows a repo-root resolution returning empty in this layout (likely git rev-parse --show-toplevel executed from the wrong directory, or a --git-common-dir-relative path assumption). Pushing from such a worktree requires --no-verify, silently bypassing the local gate. AGENTS.md mandates worktrees for all code changes, so this hits every agent working from a secondary workspace mount. Repro: git worktree add from a clone, run make setup inside the new worktree with a different filesystem prefix than the main checkout.

Activity

  1. added
    bug
    on Jul 22, 2026
  2. added a commit that references this issue on Jul 23, 2026
    5c1b6d6
  3. added a commit that references this issue on Sep 29, 2026
    8328c1c
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

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions