Skip to content

Worktree support #4

@olivoil

Description

@olivoil

When running in a worktree, the qmd collection is reported as missing, because the name of the collection is derived from the worktree path instead of the repo root.

repoRoot() uses git rev-parse --show-toplevel, which returns the worktree directory. collectionName() calls basename() on that, so each worktree gets a unique collection name instead of sharing one. ghost status reports the collection as missing, and MCP search falls back to querying all qmd collections (returning unrelated results from other projects).

This seems like a bug?

Also, each worktree gets its own .ai-sessions/ instead of being shared in the repo root. I'm not sure if this is intentional, it could be more of an issue for the completed sessions that are lost on worktree cleanup?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions