Skip to content

ACP.loadSession should replay ALL messages #30760

@imnotlxy

Description

@imnotlxy

Description

See https://agentclientprotocol.com/protocol/v1/session-setup#loading-a-session.

When all the conversation entries have been streamed to the Client, the Agent MUST respond to the original session/load request.

Currently we have a 100-messages limit:

const loadSession = Effect.fn("ACP.loadSession")(function* (params: LoadSessionRequest) {
  const snapshot = yield* directorySnapshot(params.cwd)
  yield* request(
    () => input.sdk.session.get({ directory: params.cwd, sessionID: params.sessionId }, { throwOnError: true }),
    "session",
  )
  const messages = yield* request(
    () =>
      input.sdk.session.messages(
        { directory: params.cwd, sessionID: params.sessionId, limit: 100 },
        { throwOnError: true },
      ),
    "session",
  )

Plugins

No response

OpenCode version

No response

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

No response

Terminal

No response

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions