Repository navigation
Description
Environment
Where are you using Unsloth?
- Unsloth desktop application
- Unsloth web UI (
unsloth studio) - Unsloth CLI
- Python package or notebook
- Colab or Kaggle
Operating system and version:
Windows 11 24H2
GPU model(s) and accelerator backend:
NVIDIA CUDA — RTX 5090 Mobile
Versions:
- Unsloth: v0.1.909-beta, but the problem was probably already there since some few versions
- Package: 2026.10.7, but the problem was probably already there since some few versions
- Desktop: 0.1.909-beta, but the problem was probably already there since some few versions
- llama.cpp: custom build (TheTom), commit 30d6881 — identical to the build used before the regression appeared
What happened?
Two related regressions, both triggered by the same event: the auto-compaction of a chat.
(1) Attachments attached in earlier turns become completely inaccessible after compaction.
Before a compaction, the model can quote attached documents and images verbatim — including line-by-line content. Immediately after a compaction cycle, every attachment that lived in an evicted turn is gone: images, PDFs, text/markdown documents alike. The model no longer sees them, cannot quote them, and does not even know they existed.
(2) After compaction, the model stops calling search_conversation — almost always.
Before the regression, search_conversation was often invoked (it was pratically always the first thing the model did immediately after undergoing chat compaction) whenever the user refers to earlier content, or even just to maintain consistency with what was being said (for instance, he would look for what had been stated in the most recent messages exchanged with the user).
Now instead, after the chat has been compacted, the tool is essentially never called again, even if it is still listed as available and often the question clearly requires recall. This appears to compound problem (1): the model neither has the attachment in context nor tries to retrieve it.
Both symptoms reproduce identically on local GGUF models and on API-connected models, and identically in the desktop app and in the web UI. Since the llama.cpp build is unchanged from when this worked, this looks like a backend / context-assembly issue rather than a frontend or model-side one.
Steps to reproduce:
- Start a chat with auto-compaction enabled and a context window small enough that compaction triggers within ~20 turns (e.g. 32k–70k; I had 128k).
- Early in the chat, attach a document (PDF or .md) and an image containing a unique marker string (e.g.
K7-4912). Ask the model to quote a specific line / report the marker → it does so correctly. - Continue the conversation with enough turns (long tool outputs help) to trigger the first auto-compaction. Confirm the compaction banner/notice appears.
- In a later turn, ask again: "quote the exact third line of the document I attached earlier" / "what was the marker in the image I sent earlier?"
- Observe the tool-call panel for that turn.
Expected behavior:
- Attachment content from evicted turns remains reachable — recoverable through
search_conversation(the archive should index extracted text / OCR output and preserve file references). search_conversationkeeps being invoked after compaction, as it is before compaction. Recall is the only mechanism that compensates for eviction, so losing it defeats the purpose of rolling context.
Actual behavior:
- Step 4: the model has no knowledge of any attachment. No partial recall, no garbled recollection — total absence, as if the attachment had never been sent.
- Step 5: no
search_conversationcall appears in the turn's tool calls. The model answers from the remaining visible context only, and drifts off the established decisions/conventions of the chat.
Model and operation involved:
Inference — Studio chat tab, auto-compaction (rolling context window) + per-thread archive retrieval.
- Local: Qwen 3.8-27B-Q5_K_M + mmproj, via llama.cpp backend
- Remote: Qwen 3.8 Flash Next-IQ3_S via Strata backend (OpenAI-compatible)
Same behaviour on both paths, same on desktop app and web UI.
Diagnostics and logs
BEFORE the regression: the screenshot below shows the first part of the model's response after the chat had been compacted. As you can see, the first thing it did was search through the previous messages.
AFTER the regression: the screenshot below once again shows the first part of the model's response, following a chat compaction process. As you can see, unlike before, it made no attempt whatsoever to review previous messages or invoke search_conversation.

Activity
debojyoti-dev commentedon Oct 22, 2026
I am working on it
Studio: keep turns an external provider's compaction drops searchable
Studio: preserve conversation archive order for turns with attachments (
danielhanchen commentedon Oct 23, 2026
Fixed! With API-connected models, auto-compaction trimmed the oldest turns without saving them to the conversation archive, so attached documents were lost and
search_conversationwas never offered. Trimmed turns are now archived, the relevant ones are handed back to the model on the turn the chat compacts, andsearch_conversationplus the compaction notice are available on later turns (fixed in #14731, with archive ordering for attachment turns fixed in #14768). Text inside images is still not indexed, and if a local GGUF chat still loses attachments, the server log will showconversation_archive.ingest_failedwhen the embedding server could not start.To update: Unsloth Desktop will have an update banner. For Studio, use
unsloth studio update. For Docker, usedocker exec <container> unsloth-studio-update. Reopen if it still happens.Studio: keep turns an external provider's compaction drops searchable (…