FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix: allow fork with explicit directory for stale sessions by MartinSchlott · Pull Request #49987 · anomalyco/opencode · GitHub

fix: allow fork with explicit directory for stale sessions - #49987

Open
MartinSchlott wants to merge 1 commit into
anomalyco:devfrom
heron-dynamics:stale-session-fork
Open

MartinSchlott wants to merge 1 commit into
anomalyco:devfrom
heron-dynamics:stale-session-fork

Conversation

Copy link
Copy Markdown

Issue for this PR

Fixes #46276

Type of change

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

What does this PR do?

Session requests normally remain pinned to their stored directory. This made it impossible to fork a session whose directory had moved or disappeared, even when the caller explicitly supplied a valid directory.

This change allows only POST /session/:id/fork to prefer an explicitly requested directory. Other session requests keep the existing behavior.

How did you verify your code works?

Added a regression test covering a missing parent directory, the explicit fork directory, and copied message history.

Also verified the full CLI flow with separate processes and persistent storage: create a parent session, move its directory, then run with --session, --fork, and --dir.

  • Session HTTP tests: 22 passed
  • Workspace routing tests: 9 passed
  • Package and monorepo typechecks passed

Screenshots / recordings

Not applicable.

Checklist

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

Copy link
Copy Markdown
Contributor

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

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

opencode run --session --fork stalls with zero output when --dir changes to a Git worktree

1 participant


Back | FazBrowse Home | New Git URL