entireio / entireio/cli

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

Open
#529 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Go
Stars
5.1k
Forks
475
Avg merge
1d 11h
Merged PRs (30d)
178

Description

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 ENCLI-88 — 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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing paths.WorktreeRoot() from the SessionStart hook and compare it with the prepare-commit-msg and post-commit hooks in the described bare-repository worktree workflow. Check how SessionStart, Task, and commit hooks share session context. Done means subagents launched from the non-repository orchestrator are tracked and entire explain shows their checkpoints.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, go
Domain
cli, developer-experience
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.