Sleep-Time Training: From Deployment Experience to Persistent Agent Improvement

Runze Liu, Haoran He, Jiashun Liu, Yuqian Fu, Zijie Geng, Wang You, Chen Hu, Daxin Jiang, Ling PanarXiv 2026

TL;DR

When you go to sleep, your brain replays the day’s messy experiences to consolidate memories and master skills; when your AI assistant goes idle, it usually just sits there with frozen weights. This paper introduces Sleep-Time Training (STT), a paradigm where AI agents use overnight idle periods to clean up their daily interaction logs and fine-tune their own parameters. The result is a personal assistant that genuinely learns your habits and gets better at its job day after day—without slowing down when you actually need it.

What Problem Does This Paper Address?

Modern AI agents (like coding assistants or digital workflow managers) interact with the same user across weeks or months, yet suffer from weight-level amnesia: their underlying policies remain frozen after deployment. If you spend Tuesday afternoon teaching an agent how you like your reports formatted or watching it fumble through an API, Wednesday morning usually starts from scratch.

Currently, researchers work around this in two reactive ways:

  1. Test-time scaling: Making the model "think longer" by sampling multiple reasoning paths on the fly. This improves answers right now, but adds annoying latency and leaves the model no smarter tomorrow.
  2. External memory: Logging transcripts or notes into a vector database for retrieval. It’s the equivalent of an employee frantically flipping through a massive binder of sticky notes every time you ask a question, rather than actually mastering the job—bottlenecked by retrieval errors and context window limits.
Table 1: Comparison of deployment-time improvement paradigms. STT uniquely turns deployment experience into persistent policy improvement during user-idle time.

Why not just run reinforcement learning (RL) on the daily logs overnight? Because real-world deployment traces are messy. Agents hit cascading tool errors, loop redundantly, and rarely succeed cleanly on complex new workflows—leaving standard outcome-based RL starved of positive reward signals.

Methods

Inspired by offline memory consolidation in human sleep, Sleep-Time Training (STT) turns user-idle windows into a proactive, weight-updating loop. Because raw deployment logs are too noisy for naive training, STT uses an auxiliary model (here, GPT-5.6-Luna) and a resettable environment to extract clean learning signals in two stages:

Figure 1: Overview of STT. The agent collects interaction trajectories during user-facing sessions and converts them into policy updates during sleep time. First, an auxiliary model reconstructs, replays, and validates corrected demonstrations for SFT. Second, iterative step repair pairs original trajectories with repaired continuations for group-relative RL.
  • Stage 1: Corrected Demonstration SFT (Building Priors). An auxiliary model reviews the agent's messy daytime trajectories and rewrites them into clean action sequences. Crucially, it doesn't hallucinate tool outputs: the proposed fixes are actually replayed and verified in the environment. Passing traces are used for standard Supervised Fine-Tuning (SFT), rapidly nudging the agent toward viable execution paths.
  • Stage 2: Iterative Step Repair & RL (Learning Recovery). SFT teaches the agent what a perfect run looks like, but not how to recover from its own mistakes. In Stage 2, the current agent rolls out fresh attempts. The auxiliary model scans chronologically for the earliest bad step, patches only that single action, and lets the agent finish rolling out the rest of the task on its own. Repeating this creates clean pairs of original vs. repaired trajectories. The authors then apply Group Relative Policy Optimization (GRPO)—a standard critic-free RL algorithm—over these groups, giving the agent dense, contrastive feedback anchored to states it actually visits.

Datasets

Existing benchmarks test agents in isolated, single-session one-offs. To test multi-day learning, the authors built STT-Bench by scraping 256 real Model Context Protocol (MCP) tool servers and synthesizing stateful mock services, user personas, and 100 task instances across a four-day timeline:

  • 20 Base Task Families: Seen across Days 1–3 for training/retention, plus a held-out Day 4 instance.
  • 20 Generalization Families: Unseen workflows evaluated only on Day 4 that share the same underlying user habits.

To test whether the agent truly internalized user preferences versus just reading the prompt, STT-Bench varies how explicitly prompts state user habits (from L0, where all preferences are spelled out, down to L3, where zero hints are given).

Key Insights and Ideas

  • Neither SFT nor RL works alone: Dropping RL drops the score on Qwen3.5-4B from 40.8 to 24.3; dropping SFT drops it to 23.7. Early on, weak policies fail too often for RL to find a foothold without SFT's priors. Conversely, SFT alone just clones the auxiliary teacher without teaching the agent how to navigate its own rollouts.
  • True preference internalization: When all prompt hints about user habits are stripped away (Level L3), STT retains 96.3% of its explicit-hint performance (39.3 vs. 40.8). The preferences live in the weights now, no prompt-stuffing required.
  • Smart training beats sheer size: A 4B model trained with STT (40.8 overall) comfortably outperforms a 9B model equipped with external memory or standard RL baselines (best at 31.6).

Key Results

Tested across Qwen3.5-4B, Qwen3.5-9B, and a 30B Mixture-of-Experts model (Qwen3-30B-A3B), STT beats memory systems (ReasoningBank, MemEvolve) and online RL (OpenClaw-RL) across the board:

  • Big accuracy jumps: Overall scores jump from 21.8 (best baseline) to 40.8 on the 4B model, 31.6 to 41.0 on the 9B model, and 14.0 to 21.0 on the 30B MoE model.
  • Unseen workflow transfer: On Day 4 tasks that were completely excluded from training, the 4B model nearly doubles the strongest baseline (33.4 vs. 18.2).
  • Overnight-friendly compute: Training takes ~1.5 to 2.6 hours of wall-clock time per day on an 8×H800 node—fitting neatly into a literal night's sleep while adding zero latency or token overhead during daytime use.

Limitations and Future Work

  • Simulated sandboxes: STT relies on resetting environments to replay and verify repaired actions. STT-Bench uses safe mock services, whereas replaying actions in live production (e.g., sending real emails or mutating live databases) is much trickier.
  • Bounded by the teacher: Trajectory repair depends on the combined capability of the base agent and the auxiliary model. If a task requires a completely novel tool skill that neither understands, offline reflection hits a wall—pointing toward future hybrids with active exploration or asking a human for help.

Summary updated

BibTeX
@misc{liu2026sleep,
  author = {Runze Liu and Haoran He and Jiashun Liu and Yuqian Fu and Zijie Geng and Wang You and Chen Hu and Daxin Jiang and Ling Pan},
  title = {{Sleep-Time Training: From Deployment Experience to Persistent Agent Improvement}},
  year = {2026},
  eprint = {2611.39784},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.39784},
}
Figure