Skip to content

discover/learn scan 0 sessions without --all, even from the matching project cwd #2177

Closed

Description

@jengchakhrit-ck

rtk v0.37.2, macOS (Apple Silicon, homebrew)

rtk discover and rtk learn report zero sessions when run without --all, even from a directory whose Claude Code history clearly exists.

Repro

From a project dir /path/to/proj (CC transcripts present at ~/.claude/projects/-path-to-proj/, 1266 *.jsonl in the last 30d):

$ rtk discover
RTK Discover -- Savings Opportunities
Scanned: 0 sessions (last 30 days), 0 Bash commands
No missed savings found. RTK usage looks good!

$ rtk learn
No Claude Code sessions found in the last 30 days.

$ rtk discover --all
Scanned: 1266 sessions (last 30 days), 56233 Bash commands   # data is found fine

rtk session (same underlying data) works without --all.

Impact

The no-arg form silently scans nothing and prints "usage looks good!" / "no sessions found" — a false negative that hides real missed-savings and disables the learn loop for anyone who doesn't know to pass --all.

Expected

Bare discover/learn should resolve the current project like session does, or the default should be --all.

Activity

  1. pszymkowiak commented on May 31, 2026

    @pszymkowiak
    Collaborator

    wshm · Automated triage by AI

    🔍 Automated Triage

    🐛 Category bug
    🟠 Priority high
    🎯 Confidence 87%

    Summary

    discover/learn silently scan 0 sessions without --all due to broken current-project path detection; fix default to resolve cwd like session does, or fall back to --all behavior


    Triaged automatically by wshm · This is an automated analysis, not a human review.

  2. KuSh commented on Oct 10, 2026

    @KuSh
    Collaborator

    Plain rtk discover and rtk learn now find the current project's sessions without --all. Claude Code names the project folder by replacing characters such as . and _ in the path, and rtk follows that since v0.38.0 (v0.42.3 added spaces, brackets and colons); when nothing is found, the message now names the project and suggests --all. The exact path from the report is unknown, so marking this resolved-pending-close. If v0.51.0 or later still scans 0 sessions for you, please comment with your working directory and the matching folder name under ~/.claude/projects/.

  3. added
    resolved-pending-close
    on Oct 10, 2026
  4. KuSh commented on Oct 18, 2026

    @KuSh
    Collaborator

    Fixed in v0.38.0: rtk now encodes the project folder name the way Claude Code does (dots, underscores, and later spaces, brackets and colons), so plain rtk discover and rtk learn find the current project's sessions without --all. Running both from a project path containing a dot and an underscore now scans its sessions. If you still see 0 sessions on the latest release, please comment with your working directory and the matching folder name under ~/.claude/projects/ and we will reopen.

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:clibugneeds-reproductionplatform:macospriority:highresolved-pending-close

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions