Skip to content

Support orchestrator sessions launched outside git repos (multi-repo worktree workflows) #529

@jaksiks

Description

@jaksiks

Problem or use case

entire.io doesn't track sessions when Claude Code is launched from a directory that isn't inside a git
repository, even when subagents do all their work inside git worktrees.

Workflow

I use a bare repo + worktree layout for multiple repositories:

repos/                          ← Claude Code launches here (not a git repo)
  org/
    app/                        ← bare repo root
      .git/                     ← bare git metadata + shared hooks
      main/                     ← worktree
      develop/                  ← worktree
        .claude/settings.json   ← entire hooks installed here
        .entire/                ← entire enabled here
      feature-123/              ← feature worktree
    service/                    ← another bare repo
      develop/
      ...

I launch Claude Code from repos/ so it can access cross-repo context. It then spawns autonomous subagents
(via the Task tool) into specific worktrees where they do the actual implementation and commit work.

My workflow:

  1. Creates worktrees for each ticket
  2. Runs entire enable in each worktree
  3. Launches Task subagents into those worktrees
  4. Subagents implement, commit, and push PRs

The entire tracking chain requires session context to be initialized by Claude Code hooks:

  1. SessionStart hook fires → calls paths.WorktreeRoot() → git rev-parse --show-toplevel → fails (not in a
    git repo)
  2. Session context never initialized in .entire/
  3. prepare-commit-msg hook fires in worktree during git commit → looks for active session → none found → no
    Entire-Checkpoint trailer added
  4. post-commit → no trailer → no checkpoint created
  5. entire explain → 0 checkpoints

All Claude Code hooks (SessionStart, Stop, UserPromptSubmit, PreToolUse: Task, PostToolUse: Task) fire in
the parent process context (repos/), not in the subagent's worktree.

Somewhat related to #431 — GetWorktreeID fails with .bare/ worktree layout

Desired behavior

entire is able to track context of subagents in this master/orchestrator workflow.

Proposed solution

No response

Alternatives or workarounds

I've contemplated spinning up a fake "mono-repo" in the root where I initiate Claude from to give some tracking.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions