Skip to content

claude --resume lists only recent ~10 sessions despite having 38 in ~/.claude/projects #2333

Closed as not planned

Description

@pchalasani

I have around 38 sessions in ~/.claude/projects/myproject but only around 10 show up when I do claude -r in my myproject dir.

Is there some type of setting or cli arg that I am missing?

Thanks

Activity

  1. coygeek commented on Aug 16, 2025

    @coygeek

    Hey, that's a great question. It's a bit unintuitive, but the list you see with claude --resume isn't just a simple directory listing of your session files.

    Based on the documentation and some changelog notes, here's what seems to be happening and a few ways you can get to your older sessions:

    The "Why": Conversation Summarization

    When you run claude --resume, Claude Code doesn't just list the files. It runs a background "conversation summarization" process to generate the short descriptions you see in the selector.

    The most likely reason you're only seeing about 10 is that this summarization process is hitting a limit or an error on one of your older, longer chat histories and stopping early. I noticed in the changelog for version 1.0.77 they specifically mentioned a fix for "token limit errors in conversation summarization."

    Workarounds and Solutions

    Since you can't directly change the number of sessions it lists, here are a couple of ways to access your older history:

    1. The Best Workaround: Resume Directly by Session ID

    Since you know the files exist in ~/.claude/projects/myproject/, you can grab the session ID directly from the filename and resume it that way.

    The session files are usually named something like 00893aaf-19fa-41d2-8238-13269b9b3ca0.jsonl. The filename itself (without the .jsonl) is the session ID.

    You can resume it directly like this:

    # Example using the ID from above
    claude -r "00893aaf-19fa-41d2-8238-13269b9b3ca0"

    This bypasses the interactive selector and should load your session right up.

    2. Make Sure You're on the Latest Version

    Given the changelog fix I mentioned, the first thing to try is updating Claude Code to the latest version. It might resolve the underlying summarization issue.

    claude update

    3. Check Your Cleanup Settings

    This probably isn't your issue since the files are still there, but it's good to know about. Claude Code has a setting that automatically deletes old transcripts. You can find it in ~/.claude/settings.json.

    {
      "cleanupPeriodDays": 30
    }

    The default is 30 days. If you want to keep your sessions for longer, you can increase this number.


    Hope this helps you get to those older sessions! The direct resume-by-ID trick should definitely work for you.

  2. github-actions commented on Dec 4, 2025

    @github-actions

    This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.

  3. github-actions commented on Jan 5, 2026

    @github-actions

    This issue has been automatically closed due to 60 days of inactivity. If you're still experiencing this issue, please open a new issue with updated information.

  4. pchalasani commented on Jan 5, 2026

    @pchalasani
    Author

    {
    "cleanupPeriodDays": 30
    }

    Thanks for detailed reply -- looks like this setting isn't there any more?

  5. github-actions commented on Jan 12, 2026

    @github-actions

    This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.

  6. locked as resolved and limited conversation to collaborators on Jan 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:corearea:tuiautocloseIssue will be closed automaticallyquestionIssue is asking a question about how Claude Code works, or similar

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions