Allow paginated or incremental history loading for long session/load sessions #841
Replies: 2 comments
|
I think allowing session load to have an optional cursor would make a lot of sense, and might mean we could replace most session/resume cases. Happy to received an RFD on this |
|
The active v2 Session Resume Replay RFD now gives this discussion a concrete direction: One compatibility question still looks worth pinning down before implementations diverge: what delivery and retry semantics should clients rely on if the connection drops during replay? Would a small language-neutral fixture pack be useful here? I would cover:
Each case could carry raw ordered events, stable identifiers where the protocol provides them, digests, expected ordering, and a field-preservation matrix. The key question for the retry case is whether v2 should require duplicate-suppressible stable identifiers, or define replay as at least once and make client idempotence explicit. If this belongs as an RFD follow-on or a non-normative fixture, I can draft the cases in that form. |
Uh oh!
There was an error while loading. Please reload this page.
Problem
session/loadcurrently requires the agent to replay the entire conversation history back to the client before completing the request.That works for short sessions, but it becomes awkward for long-lived sessions:
session/resumeis not a full answer because it restores context without returning prior messagessession/listalready uses cursor pagination for discovery, but there is no equivalent standard mechanism for retrieving large histories incrementally.Possible directions
A few options seem reasonable:
session/load(for examplecursor,beforeMessageId,afterMessageId,pageSize)session/historyorsession/messagesmethod for incremental history retrieval, while keepingsession/loadas "restore + optional full replay"A separate history-reading method might be cleaner, because it avoids changing the existing restore semantics of
session/load.Question
Is the current intent that clients should rely on
session/resumeplus some agent-specific history API for large sessions, or would ACP want a first-class paginated history mechanism?All reactions