Skip to content

ACP unstable_listSessions only returns sessions for the current project #18575

Description

@remorses

Description

unstable_listSessions in the ACP agent calls sdk.session.list() which is scoped to the current project via Instance.project.id. When running opencode acp from / (or any non-git directory), the project ID resolves to "global", so sessions from actual git projects are never returned.

The global session list endpoint (GET /experimental/session) backed by Session.listGlobal() already exists and queries SQLite across all projects, but the ACP agent doesn't use it.

Steps to reproduce

  1. Have sessions in multiple git projects
  2. Start ACP server from /: opencode acp --cwd /
  3. Call unstable_listSessions({ cwd: "/" })
  4. Only sessions with projectID === "global" are returned — sessions from git projects are missing

Expected behavior

unstable_listSessions should return sessions from all projects, using the existing experimental.session.list endpoint.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions