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.915-beta
- Package: 2026.11.2
- Desktop: 0.1.915-beta
- llama.cpp: custom build (TheTom), commit 30d6881 — but in reality it is irrelevant
What happened?
Same identical issue of #16187 and #16602, the new update has probably solved nothing.
@danielhanchen @debojyoti-dev ok, we're probably facing a very stubborn problem. I don't know now if it's just me or if it's everyone's problem. I don't know if you could try it too, you don't necessarily need long chats, just limiting the maximum context window of an AI model to a smaller chat is enough. At this point, if there's anything I can do to help you solve this problem once and for all, I'd definitely be happy to help
The search_conversation tool has totally disappeared from the list of tools available to an AI model—both for models running via llama.cpp and those accessed via API. Consequently, once a chat is compacted, the AI model no longer has any recollection of what happened previously, with no way now to retrieve that informations.
Steps to reproduce:
- Asking any question in a long chat—one that exceeds the AI model's current context window
- The context will surely be compacted
Expected behavior:
As shown in the photo, the model would have firstly used the search_conversation tool and subsequently begun its reasoning process. Note how, in this example, it uses the tool even during the reasoning process, whenever it needs to retrieve information that probably is already in the chat
Actual behavior:
The model is completely oblivious and hasn’t the faintest idea what is going on—especially if the chat history has been aggressively compacted.
API model:
Local llama.cpp model:
When the search_conversation tool was working I tried asking the model the exact same question, and it replied that it saw it among its available tools and had even used it in front of me. Both of these two screenshots were taken on the new version (v0.1.915-beta)
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
Activity
debojyoti-dev commentedon Nov 5, 2026
Hi @Dhrhciebcy, thanks for the detailed report and screenshots. I'd like to work on this one.
I think the common piece across #16187, #16602 and this issue is the conversation archive write, not the tool list.
search_conversationis only offered once something has been archived for the chat, and archiving needs the embedding model to run. When that step fails, Studio still drops the old turns on compaction but saves nothing searchable, so the model gets no recalled turns and the tool never appears. I reproduced that on a local Studio build: with a working embedder the tool comes back from the turn after the first compaction, and with a failing one it never does and the model says it sees no earlier turns, as in your screenshots.My plan is to keep the dropped turns searchable by keywords when the embedding step can't run, so the tool and the automatic recall keep working, and to re-index them with embeddings once the embedder works again. If you can, a look in the Studio log for
conversation_archive.ingest_failedorconversation_archive.embedder_pendinglines would confirm it on your machine.cc @danielhanchen
JNLLM commentedon Nov 5, 2026
Hi there. I'm experiencing the same woes that @Dhrhciebcy explains. The chat compaction is so extreme that the next 40k tokens are expended into "what I was doing??", and the poor model does what it can to return to the tracks. I don't think this is a good compaction method since I'm experimenting adding a rule to "write the steps that you will be following to {file}.md before proceeding" and feeding into the next response after compaction.
About compaction I have noticed that "preserve_thinking" matters: Model thinks into the [output omitted: ... no context room left] zone. Then auto compaction follows. But "preserve_thinking" off discards thinking tokens. So the next response is still in "orange" context zone. The model keeps thinking into red context zone [output omitted: ... no context room left] again. Then compaction at last, and a lost model trying to keep its sanity again.
Maybe we need some kind of thread to help the model to keep its focus? I know that "search_conversation" tool call should help, but I found that sometimes goes to a point into the past that it is not relevant in the recent context in very long chats. When I saw "bookmarks" the first thing I thouth was that "hey, a system for marking relevant context" but also I was wrong :D
Of course I am not an expert. Maybe I am wrong in all of it.
But as allways, thank you for yout work.
Dhrhciebcy commentedon Nov 5, 2026
@debojyoti-dev you're absolutely right about the embedding model, I hadn't thought about that! I’ve just checked the logs, and I can confirm that an error related to the embedding model appeared during my yesterday tests:
But I also figured out the reason for this: the version of llama.cpp I was using was an older one that didn't support embeddinggemma 2. So, this morning I immediately switched the version of llama.cpp to the one built into Unsloth Studio.
The result is rather "strange": the model via the API still doesn't see the
search_conversationtool, whereas this time, the model loaded using llama.cpp detected it and used it right away (see the screenshot below, it replied to me in Italian but never mind ahahah):The strange thing, however, concerns an experiment I decided to conduct afterward: in Unsloth Studio, I reverted to the older version of llama.cpp and tried to regenerate the model's response; to my surprise, the
search_conversationtool was still there (see the screenshot below):Below is the log:
As you can see, the embedding model failed again, as it did last night, but despite everything, the
search_conversationtool was detected and used correctly (again from the model via llama.cpp). I don't know if I'm stating the obvious (most likely), but I wanted to point it out anyway.A few honest notes: while doing this experiment, I neither reloaded the entire model nor restarted Unsloth Studio.
In all of this, if I may express an opinion, I would have noticed this problem with the embedding model much earlier if Unsloth Studio had flagged the error, for example with a pop-up notification.
Therefore, @debojyoti-dev I would suggest, in addition to your change, possibly also adding this feature, an error notification to the user from Unsloth Studio in case there are problems with the embed model, which could therefore also affect the correct functionality of the
search_conversationtool.I would always thank @JNLLM for his support to the various issues I'm reporting, as well as you developers of course, who are quick to step in and always come to my aid
danielhanchen commentedon Nov 7, 2026
Fixed! When the embedding model could not start (here an older custom llama.cpp that cannot load embeddinggemma-2), compaction dropped the old turns without saving a searchable copy, so the chat had no archive and
search_conversationwas never offered. Fixed in #16718: those turns are now kept for keyword search, so the tool and recall keep working, and they are re-embedded automatically once the embedder runs again. Thanks @debojyoti-dev for the fix and @Dhrhciebcy for the logs that pinned it down.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 compacted turns searchable when the archive embedder fai…