arXiv:2610.09590cs.AIOct 2026

Manuscript Offprint

arXiv:2610.09590

Learning Situation-Conditioned Thinking Policies for Long-Term LLM Agents

Hong Su

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Hong Su

Abstract—Long-running autonomous agents must reuse accumulated reasoning experience without allowing explicit historical memory and LLM context to grow indefinitely. However, existing memory mechanisms mainly retrieve, summarize, or compress past content and do not directly learn when particular kinds of thinking should be activated or discover new thinking knowledge from temporally dispersed experiences. This paper proposes a situation-conditioned thinking memory framework that transforms historical reasoning experience into a lightweight policy for predicting what should be thought about in the current situation, while leaving detailed reasoning to a large language model. Situations may represent temporal or spatiotemporal evolution rather than only current states. Temporary experiences are also periodically analyzed across multiple independent episodes to identify repeated long-range regularities, which are consolidated into new thinking knowledge and further internalized by the lightweight policy. Experiments show that the learned policy achieves 1.000 F1 on temporal-rule generalization, improves DeepSeek reasoning F1 from 0.789 to 0.868, reduces online processing time from 0.3636 ms to 0.0382 ms per query at 30,000 historical situations, and reaches 1.000 relation-discovery F1 and future-thinking accuracy after sufficient repeated cross-experience evidence.

Index Terms—Situation-Conditioned Thinking; Long-Term Agent Memory; Cross-Experience Knowledge Discovery; LLM Agents

I. INTRODUCTION

Long-running large language model (LLM) [1] [2] agents increasingly operate in settings where they must accumulate experience, revisit earlier situations, and reuse previously effective reasoning over extended periods. This requirement is particularly important for autonomous agents and robots, whose decisions may depend not only on the current observation but also on how a situation has evolved over time. As interaction continues, however, the amount of historical observations, reasoning traces, outcomes, and reflections grows continuously. Simply retaining all of this material as explicit memory makes subsequent reasoning increasingly dependent on retrieval, context construction, and repeated LLM processing. A more scalable agent therefore needs not only to remember past content, but also to progressively internalize reusable knowledge about what should be thought about when similar situations reappear.

Existing long-term memory mechanisms mainly address this problem through retrieval, summarization, reflection, or structured memory organization [3] [4]. These approaches preserve valuable historical evidence and can improve subsequent reasoning, but they usually continue to depend on an external memory whose size grows with experience. Summary-based compression can reduce this burden, but may discard temporal ordering and subtle transitions that determine which kind of reasoning is required. Reflection methods can produce higher-level textual knowledge, yet the resulting reflections are still typically stored and later retrieved rather than learned as an automatic situation-to-thinking policy. Reasoning distillation provides another alternative, but usually trains a smaller model to reproduce answers or reasoning traces, whereas many long-term agents still benefit from retaining a powerful LLM for detailed reasoning. In addition, some useful knowledge is not explicitly present in any single historical record: it may only become apparent after multiple temporally separated experiences exhibit a repeated pattern, such as an event A followed much later by B and eventually by C. Therefore, a long-term agent requires a mechanism that can both internalize recurring thinking requirements and discover new reusable thinking knowledge across accumulated experiences.

In this paper, we propose a situation-conditioned thinking policy for long-term LLM agents. Instead of repeatedly retrieving complete historical reasoning traces, the framework learns a lightweight mapping from a situation to the thinking requirement that should be activated under that situation. A situation may describe a static state, a temporal transition, or a longer spatiotemporal evolution, allowing the same current state to trigger different thinking when it is reached through different histories. The lightweight model predicts what or when to think, while the LLM remains responsible for how to reason over the current evidence. In this way, historical reasoning is used as training material rather than being treated only as permanent online context.

The framework further introduces periodic cross-experience consolidation for knowledge that cannot be extracted reliably from a single record. Temporally dispersed experiences are first organized into candidate long-range relations, after which repeated support, counterexamples, reverse-order evidence, and cross-period stability are considered during consolidation. Stable relations are formulated as new thinking knowledge and transformed into additional training material for the lightweight policy. Consequently, a repeatedly observed pattern such as A…B…CA \ldots B \ldots C can eventually be internalized as a future thinking rule A…B→A \ldots B \rightarrow “consider possible CC” before CC is observed. This mechanism allows the agent to move progressively from explicit historical experience to reusable thinking behavior, while still preserving temporary or episodic

H. Su is with the School of Computer Science, Chengdu University of Information Technology, Chengdu, China.

E-mail: suguest@126.com.

memory for unresolved and newly emerging situations.

The main contributions of this work are summarized as follows:

• We introduce a situation-conditioned thinking memory mechanism that learns a lightweight policy for predicting what kind of thinking should be activated, while leaving detailed reasoning to the LLM.

• We represent situations using temporal or spatiotemporal evolution rather than only the current state, enabling the learned policy to distinguish histories that end in the same observation but require different reasoning.

• We develop a periodic cross-experience consolidation mechanism that identifies stable long-range regularities across repeated experiences, formulates them as new thinking knowledge, and converts them into training material for future automatic thinking activation.

The remainder of this paper is organized as follows. Section II reviews long-term LLM memory, reflection and experience reuse, and temporal cross-experience knowledge discovery. Section III presents the proposed situation-conditioned thinking framework and its periodic consolidation mechanism. Section IV describes the experimental setup and evaluates the proposed method across six complementary experiments. Finally, Section V concludes the paper and discusses the implications of learning reusable thinking behavior from long-term experience.