Skip to content

fix(core): run sessions with the same directory they were created with#24877

Open
jlongster wants to merge 2 commits intodevfrom
jlongster/pin-session
Open

fix(core): run sessions with the same directory they were created with#24877
jlongster wants to merge 2 commits intodevfrom
jlongster/pin-session

Conversation

@jlongster
Copy link
Copy Markdown
Contributor

Issue for this PR

N/A

Type of change

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

What does this PR do?

Session routes were using the current request directory when reopening or continuing an existing session. This changes the workspace router to look up the session first and run non-workspace session requests inside an instance created from the session's saved directory, so later directory query params do not move the session to another cwd.

The regression test uses the full Hono app and verifies emitted sync events keep the original session directory while unrelated routes still use the request directory.

How did you verify your code works?

  • bun test test/server/session-routes-directory.test.ts
  • Push hook ran bun turbo typecheck

Screenshots / recordings

N/A

Checklist

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

@jlongster jlongster added the beta label Apr 29, 2026
Bojun-Vvibe added a commit to Bojun-Vvibe/oss-contributions that referenced this pull request Apr 29, 2026
- anomalyco/opencode#24877: session directory routing fix (merge-after-nits)
- anomalyco/opencode#24852: JSON skill serialization for non-Anthropic models (merge-after-nits)
- openai/codex#20113: heredoc file_redirect sandbox bypass fix (merge-after-nits)
- openai/codex#20096: remote installed plugin cache for skills/MCP (merge-after-nits)
opencode-agent Bot added a commit that referenced this pull request Apr 29, 2026
opencode-agent Bot added a commit that referenced this pull request Apr 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant