-
Notifications
You must be signed in to change notification settings - Fork 232
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:
- Creates worktrees for each ticket
- Runs entire enable in each worktree
- Launches Task subagents into those worktrees
- Subagents implement, commit, and push PRs
The entire tracking chain requires session context to be initialized by Claude Code hooks:
- SessionStart hook fires → calls paths.WorktreeRoot() → git rev-parse --show-toplevel → fails (not in a
git repo) - Session context never initialized in .entire/
- prepare-commit-msg hook fires in worktree during git commit → looks for active session → none found → no
Entire-Checkpoint trailer added - post-commit → no trailer → no checkpoint created
- 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.