fix(acp): list known sessions across projects on empty cwd - #33789
fix(acp): list known sessions across projects on empty cwd#33789Haohao-end wants to merge 1 commit into
Conversation
|
The following comment was made by an LLM, it may be inaccurate: Potential Duplicate Found:
This PR appears to be directly related. Both PRs address the same issue of listing sessions across projects in the ACP. PR #33037 has a nearly identical title and appears to be working on the same problem. You should check whether #33037 is already merged or if it's the same fix being resubmitted. |
|
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:
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. |
Issue for this PR
Closes #33036
Type of change
What does this PR do?
ACP
session/listwas routed through the project-scoped/sessionendpoint (sdk.session.list), so a request with nocwdonly returned sessions for the ACP process's own project instead of every known session. Per the ACP spec, empty params must return the first page of known sessions, andcwdis an optional filter.This switches
listSessionsto the cross-project listing (sdk.experimental.session.list, backed bySession.listGlobal). Whencwdis omitted it returns all known sessions; whencwdis supplied it filters by that directory. The existing live/in-memory ACP entries are still merged on top.How did you verify your code works?
bun typecheckinpackages/opencode(andbun turbo typecheck --filter=opencode) — clean.bun test test/acp— 121 pass (updated the service-session mock to exposeexperimental.session.list).bun test test/server/session-list.test.ts test/server/global-session-list.test.ts— 14 pass.bun test test/cli/acp— 15 pass.prettier --checkandoxlinton the changed files — clean.Screenshots / recordings
N/A (logic change, no UI).
Checklist