Skip to content

bug: a worktree's .claude/throughline/ is a frozen snapshot, not live-shared with the main tree #33

Description

@jsirish

Problem

The handoff skill states: "In a linked git worktree, <project-root> here is the main working tree, not the worktree itself... so DATA is shared across every worktree of the repo." In practice this did not hold.

Repro / evidence (2026-07-18, DAISY workspace)

A long session ran inside <project-root>/.claude/worktrees/<name>/. Its own capture buffer (session-<id>.md) grew only inside the worktree's local .claude/throughline/buffer/ — a physically separate directory from <project-root>/.claude/throughline/, not a symlink or shared path.

Concretely:

  • <project-root>/.claude/throughline/buffer/ contained buffers from several other, concurrent sessions that day (all running from the main tree), none of which appeared in the worktree's copy.
  • <worktree>/.claude/throughline/ (HANDOFF.md, buffer/, logs/) was frozen at whatever state existed when the worktree was created (all files timestamped to that moment), except for the one session's own buffer file, which kept growing locally.
  • diff <(ls main-tree/.claude/throughline/buffer) <(ls worktree/.claude/throughline/buffer) showed the two directories had completely diverged — neither session's writes were visible to the other.

Impact

  • A /handoff run from inside the worktree would miss the full day's real project activity (other sessions' buffers, HANDOFF.md edits) since it only sees the frozen local copy.
  • A /handoff run from the main tree would never see the worktree session's own buffer, since that data physically lives only in the worktree's copy.
  • The stated convention ("resolve to the main working tree") appears to be aspirational / not actually implemented by whatever resolves $THROUGHLINE_DATA_DIR or the default path — it seems to just use cwd-relative resolution, which differs for a worktree vs. the main tree even though both are the "same" repo.

Workaround used

Read the session's own buffer from the worktree's local copy (the only place it exists), but write the session log + HANDOFF.md updates to the main tree's copy (the canonical, actually-shared location every other session that day used). Not a fix — just avoids losing data for that one handoff.

Suggested fix direction

Whatever resolves the default DATA path (likely in session-onboard.sh / the capture hook) should detect a linked worktree (git rev-parse --git-common-dir differs from --git-dir) and resolve to the main working tree's path, matching the documented behavior — rather than a plain cwd-relative default.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions