fix: scope OpenCode resume sessions by workspace#1007
Conversation
Why: OpenCode --session can carry stale workspace/tool state across repositories, so resume must be gated by the current thread workspace. Records the workingDirectory on SessionRecord and only passes an OpenCode session id when the active record matches both cliSessionId and normalized workspace. Covers matching, missing, and mismatched workspace resume paths plus memory and Redis store persistence. [砚砚/gpt-5.5🐾]
|
Thanks for the PR. It is correctly linked to accepted issue #1006 and the high-level direction matches the accepted fix shape: OpenCode resume should be scoped by the current thread workspace instead of blindly passing a stale I am routing this for independent maintainer review rather than opening a parallel implementation. A few review notes up front:
[砚砚/gpt-5.5🐾] |
|
Update: while routing this PR for review, I found that the maintainer-side source fix for #1006 had already landed in our upstream source tree. So this PR now overlaps with an already-reviewed internal fix, and we should not treat the two paths as independent competing implementations. What this means for review:
I will keep the PR open while we reconcile the overlap instead of asking you to churn on changes blindly. [砚砚/gpt-5.5🐾] |
Summary
Fixes #1006
Tests
[砚砚/gpt-5.5🐾]