Losing Chat history on closing DT4 window

I’ve been working successfully with Claude in DT4 in reviewing thesis documents and revisions. Everything has worked fine one I got the hang of it (need to manually select documents before AI can access them, but AI has access to folder in creating new documents, I wish I could rewrite access to an entire folder, but that’s a minor issue). When I normally start my session, I open a folder window, and usually go to the little drop-down menu at the top to select the most recent chat, so that I can continue the previous discussion.

Today I encountered an unexpected problem. At the end of the session I asked Claude to write the notes and translation to a markdown file, which included what we had gone over in detail. I then copied the translation and closed the window. However, I then noticed that the translation and notes file had not been written to the directory. So I opened a new window for the same folder, and used the drop-down to to re-select the latest chat. Unfortunately, only yesterday’s chat was available, the one I had just worked on for several hours today was missing.

Asking AI about this, I was told that chats are saved with the window, and that I just needed to open the most recently modified document, and that chat would be there. However this was not the case. No matter what folder or document I opened, the contents of today’s work we’re not available in the drop-down window, meaning I basically lost everything except what I last had on the clipboard.

AI suggested that in the future I create a working document for each folder, and keep using that one for the discussion, but I’m not sure that that’s the best procedure.

TLDR: today’s chat in open window was lost when window was closed, and not accessible via the history drop-down. AI seems to associate each window with its own chat, and if a failure to write occurs, work can be lost if not saved to a document before closing the window.

To be honest, AIs know next to nothing about DEVONthink’s internals or usage, especially as recent features are usually not yet part of the training data.

But the most recent chats should be available in any window via the chat inspector and also via the chat popover (assuming that recent chats are not disabled in Settings > AI > Chat). Therefore it’s not necessary to open the right document.

What kind of window did you close - a main or document window? Did the app crash or did you use force quit? Are you able to reproduce the issue? So far we have neither experienced this nor received similar reports.

Thanks for the fast response. Amain window was open, and I opened a group (folder) window containing documents 15 documents (PDF and markdown) of documents related to a Student thesis (Chinese and English), and one subgroup (unopened). I went to the group inspector chat and selected the previous day’s discussion from the little dropdown. I then spent about 2 hours discussing technical aspects and writing a one page response to the student in English. I then asked AI to translate to Chinese, and write a summary with the English and chinese text into a markdown document (I’ve done this several times and it works very well). I then selected the Chinese text, close the window, and pasted the text into my email client. There were no glitches or crashes or other errors. I figured we were done.

But I had a second thought, and realized that the document I asked to be output did not exist in the group folder. So I opened up the inspector, and realize that the only chat in the history drop-down was the one from yesterday. On asking AI about the problem, it admitted it had not written the markdown file I asked for. That was the moment I realized the chat we had worked on all day including the English and Chinese translations were also missing.

That’s when claude told me that chats are saved in the window, and I should just open the most recently change document. However there were no other chats available beside the one from yesterday.

Somehow, Claude had run into a permissions problem or something internal that caused it to not write a file, which has happened on occasion, but it’s usually not a problem. But in this case I had closed the window containing the chat, and opening another window in the group, did not give me the most recent chat in the drop-down. If it is saved in some other location that would be valuable.

Otherwise, no errors (other than a lost chat and unwritten file), no crash, no windows disappearing, everything was done as expected. I did not try to reproduce, because I have no idea how to make claude fail to write to a document, which is the only error that occurred.

Most likely Claude either did not even try to create the document or used invalid tool call parameters. Does a search for kind:markdown added:#2 return anything useful? P.S: Which Claude model did you actually use?

Searching kind:markdown added:#2 resulted in finding several files, all in the project group, accept one file found in the Database root directory, which seems to be the file I had asked Claude to write before I closed the window yesterday morning. I had not switched to root, and was still in the project group, which is why I thought the file had not been written.

Another odd behavior: when I open that earlier file in a new window, and look at the chat drop down, the morning chat is still missing from the history, but when I select the afternoon chat, the file list jumps into the project group rather than staying at the root directory. This seems strange.

So, Claude wrote to the root directory rather than in the working group, and when I closed that session window, the morning chat session also disappeared from the drop-down (so, you are correct, the chat is not saved in the document). Just to be clear, I did not clear the chat history. The yesterday afternoon chat is available, but does not contain the morning session, and sessions from the previous days are also still available.

I’m using Claude Sonnet 4.6

Selecting a recent chat should restore the original selection but not necessarily the same group.