GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(opencode): scope --continue to the current worktree directory by markjaquith · Pull Request #33521 · anomalyco/opencode

Conversation

@markjaquith

@markjaquith markjaquith commented Jun 23, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Issue for this PR

Closes #25963

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Fixes the bug where opencode --continue would continue the wrong session if you were using worktrees

Root-level git worktrees of the same repo all share an empty project-relative path (""), so listByProject filtered root sessions by project_id alone and --continue could resume another worktree's most recently updated session.

This fix sends the current absolute directory with the TUI session list query and, when the project-relative path is empty, filters sessions by that directory. It also adds a regression test with two real git worktrees asserting the feature worktree's list excludes the main worktree's root session.

How did you verify your code works?

  • Integration tests (included in PR)

Screenshots / recordings

If this is a UI change, please include a screenshot or recording.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

If you do not follow this template your PR will be automatically rejected.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@github-actions github-actions Bot added needs:compliance This means the issue will auto-close after 2 hours. contributor labels Jun 23, 2026
@github-actions

github-actions Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

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

Based on my search, I found one potentially related PR that addresses similar session scoping concerns:

Related PR:

  • fix(tui): scope non-git sessions by directory, not hierarchical path #31210 - fix(tui): scope non-git sessions by directory, not hierarchical path
    • This PR addresses a similar issue of scoping sessions by directory rather than path hierarchy, which relates to the worktree/directory scoping problem being fixed in PR fix(opencode): scope --continue to the current worktree directory #33521.

However, this is not a duplicate—it's a related but distinct fix. PR #31210 focuses on non-git sessions while PR #33521 specifically addresses git worktrees for the --continue command.

No duplicate PRs found

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@markjaquith
markjaquith force-pushed the evaluate-worktree-bug-fix branch from b8912b9 to d690cbe Compare June 23, 2026 15:46
@github-actions github-actions Bot removed the needs:compliance This means the issue will auto-close after 2 hours. label Jun 23, 2026
@github-actions

github-actions Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@markjaquith
fix(opencode): scope --continue to the current worktree directory
e17e6ab
Root-level git worktrees of the same repo all share an empty
project-relative path (""), so listByProject filtered root sessions by
project_id alone and --continue could resume another worktree's most
recently updated session.

Send the current absolute directory with the TUI session list query and,
when the project-relative path is empty, filter sessions by that
directory. Add a regression test with two real git worktrees asserting
the feature worktree's list excludes the main worktree's root session.

Closes anomalyco#25963
@markjaquith
markjaquith force-pushed the evaluate-worktree-bug-fix branch 2 times, most recently from 956ebb4 to e17e6ab Compare June 23, 2026 16:43
@markjaquith
markjaquith marked this pull request as ready for review June 23, 2026 21:43
@github-actions github-actions Bot mentioned this pull request Jul 23, 2026
fix(session): scope default lists by directory #38532
Closed
3 of 6 tasks
@github-actions

github-actions Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Automated PR Cleanup

Thank you for contributing to opencode.

Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions.

This PR was closed because it matched the following cleanup criteria:

  • The PR was created more than 1 month ago
  • The PR had fewer than 2 positive reactions
  • Positive reactions are counted as thumbs-up, heart, celebration, or rocket reactions on the PR

PRs created within the last month are not affected by this cleanup.

If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate.

Thanks again for taking the time to contribute.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot closed this Jul 23, 2026
@github-actions github-actions Bot added the automated-pr-cleanup label Jul 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

automated-pr-cleanup contributor

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

--continue resumes latest session across root-level git worktrees instead of current worktree

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@markjaquith
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.