ADR-0004 — Paged messages for the add_messages reducer
- Status: Superseded by ADR-0025
- Date: 2026-11-12
- Supersedes: none
- Authors: project maintainers
Context
The first feature set included convenience reads beyond the BaseCheckpointSaver contract, among
them "messages of a thread, newest first, paged". On a DeltaChannel thread that read could avoid
loading the whole message list to show its last page; on a plain thread the list is one stored
value, so paging can only happen after loading it. The convenience reads were then planned as a
read-only companion class beside the saver, so that the saver stayed a drop-in replacement.
Decision
We will keep paged messages, for LangGraph's standard add_messages reducer only, and ship it
only if a comparison with get_state shows it returns the same messages.
Alternatives considered
- Support any reducer — rejected: the saver cannot run reducers, so it can page only a list whose update rule it knows.
- Drop the read — not taken at the time; ADR-0025 later took it.
Consequences
- A second implementation of
add_messagessemantics would have lived in the saver, with a comparison test to keep it honest. - Superseded by ADR-0025: the read is dropped, and the companion class with it.