Skip to content

fix: scope session list and children to current worktree#13960

Open
naaa760 wants to merge 1 commit intoanomalyco:devfrom
naaa760:fix/sess-get-worktree
Open

fix: scope session list and children to current worktree#13960
naaa760 wants to merge 1 commit intoanomalyco:devfrom
naaa760:fix/sess-get-worktree

Conversation

@naaa760
Copy link

@naaa760 naaa760 commented Feb 17, 2026

fix: #13782

what does this PR do?

  • Issue: Sessions from one worktree appeared in another because list only filtered by project_id.
  • Change: Restrict list and children to the current worktree by filtering on directory (worktree root or under it).
  • Escape LIKE so %/_ in paths don’t match wrong sessions.

Why:

  • Instance.worktree is the request’s work tree root; sessions already store directory under it, so this keeps worktrees separate.

@github-actions
Copy link
Contributor

The following comment was made by an LLM, it may be inaccurate:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Sessions gets mixed up across worktrees

1 participant