arXiv(opens in a new tab)cs.AIAug 2026Cited by 1 paper on PaperVantage

Manuscript Offprint

arXiv:2608.14528

Handover of In-Context Learning State Across Session Boundaries

Masahiro Kato, Taka Kato

Abstract

This study investigates the methodological and theoretical properties of session handover in applications that use large language models. A task may continue in a new session when the context reaches the model’s input limit, when the application restarts, or when another agent is asked to finish the task. The application must then decide which information from the earlier session to pass on. We formulate handover as the transfer of a task-relative in-context learning (ICL) state and distinguish exact recovery of earlier material from preservation of the target distribution. Under an exogeneity condition, predictive equivalence characterizes the coarsest deterministic sufficient handover and gives a fixed-length bit requirement. The analysis isolates the effects of the memory constraint, the writer, and the continuation procedure, and quantifies the cost of writing before the realized downstream query is known. We propose a three-part record that stores decisions and constraints exactly, uses task-justified statistics for repeated evidence, and retains original observations whose effect is not preserved by those statistics. Gaussian linear regression gives an exact finite-dimensional handover and finite-bit perturbation bounds, while nonparametric regression gives upper and lower bounds that relate memory to squared prediction error. These results provide a theory and method for deciding what a handover must retain and how its memory requirement depends on the continuation task.

Keywords: session handover; in-context learning; predictive sufficiency; memory-constrained prediction; prompt compression

1 Introduction

An application may call a large language model more than once while completing a task, and we call the application an agent when the model chooses an action, the application executes it, and the result is included in a later call. A session is a sequence of model calls that share the same earlier messages and tool results. The context of a call is all information supplied to the model in that call. As the task continues, the context may reach the model’s input limit and require the application to shorten the context or start a new session. A new session may also begin after the application restarts or when another agent is asked to finish the task. In the setting studied here, the new session receives only the information that the application passes on. We call the transition from one session to the next a session handover or session handoff, the information placed directly in the new session the handover record, and the model or program that prepares the record the writer. A file or database created from the earlier session is counted separately when the new session can still read it.

The handover record need not reproduce the earlier conversation, but it must retain the information on which the unfinished task still depends. A constraint may rule out an action, and examples in the earlier context may change a later prediction. Because a prose summary can omit either type of information, we judge the record by the prediction or action after the handover rather than by its similarity to the earlier wording.

Information from the earlier session can reach the next model call through the prompt or through a file or archive that the agent can read, and we count every such source because each one can affect the result. A key–value (KV) cache serves a different purpose: it stores values used by attention so that the model need not repeat earlier calculations, but it does not explicitly represent the task objective, commitments, or supporting observations. Because the application usually writes the handover before it knows the next query or tool result, the record must retain the information needed across the later inputs included in the evaluation.

This information order makes handover a pre-query state-coding problem, unlike query-aware prompt compression. The writer knows the task and the earlier context, but the continuation procedure observes the realized later input only after the record has been written. Classical tools from statistical sufficiency, Bayesian decision theory, comparison of experiments, and source coding can describe this order. We study which distinctions among earlier contexts remain relevant to the continuation, how a memory limit changes the attainable risk, and how pre-query encoding differs from compression performed after the later query is known.

References (19)