Claude Code deletes anything under ~/.claude older than cleanupPeriodDays, and the default is 30 days, so a terminal session you want to search next month is already gone. Desktop app sessions are kept at any age since v2.1.248. Raising it to 3650 is a one line change in settings.json.
commit 9fbffc6