Notepad++ should update the session when you close the file inside Notepad++, so that when Notepad++ exits, it should remember to not have the file in the session the next time. I’ve never personally seen that fail, in 15+ years of using Notepad++.
If Notepad++ is in multi-instance mode, the instance that saves the session might not be the one you think. I see you have it default to mono-instance mode, based on your Debug Info. But do you ever use the “move to new instance” or “clone to new instance” commands, to have multiple Notepad++ windows open at once? If you do, then only one of them gets to save the session, so files you close in a second instance would not be removed from the session. If you only ever have one Notepad++ window open, then that’s not the culprit.
My other guess is somehow you have a permissions issue on session.xml. As an experiment:
Exit all open Notepad++ windows.
Look at %AppData%\Notepad++\session.xml properties (Right Click in Explorer, then Properties), and look at the last-modified time, as well as the Security tab’s permissions section for your user (or for USERS in general, if your user isn’t listed in the choice box):
make note of the last-modified time , and make sure “read only” is not checkmarked.
[image: 1795190652610-effba03f-4f20-4de5-a4bb-ccc550f75edb-image.jpeg]
Make sure your user has write-permission to the file
[image: 1795190669034-3702b1ed-44d7-46d6-b6fe-b92ba7655ecb-image.jpeg]
Run Notepad++
Close one of the tabs in Notepad++, so it should remove it from the session.
Exit Notepad++
Look at %AppData%\Notepad++\session.xml properties again, and see if the last-modified time has updated. If it’s not been updated, then Notepad++ is, for some reason, not writing to the session file.
Run Notepad++ again, and see whether the closed file is still closed, or whether Notepad++ re-opened it.
If that works, then the system as a whole should be working, so maybe it will work from now on. If it doesn’t work, then tell us where in the process it diverged from expected behavior (screenshots of the properties, similar to mine, would be nice)