Skip to content

analytics --session <id> filter is silently ignored — output aggregates all sessions #421

Description

@s5unanow

Description

The --session <id> flag on codemie analytics is silently ignored. Whether used with terminal output or --report, the result aggregates all sessions instead of the requested one. No error or warning is printed, so the user gets a plausible-looking but wrong report.

Other filters work correctly — --branch applied to the same target session correctly isolates it (verified), so the session-file scanning and filtering pipeline itself is fine; only the --session predicate appears to be dropped.

Steps to Reproduce

  1. Have multiple sessions tracked (in my case 363 sessions across several projects)
  2. Pick a valid session ID, e.g. from codemie analytics --last 7d --export json
  3. Run: codemie analytics --session e455c8d6-b265-45be-a8f8-af454b656aa6
  4. Observe the summary header: Sessions: 363 — all sessions, not 1
  5. Same with HTML: codemie analytics --session <id> --report — the generated report embeds all 363 sessions (verified by counting "sessionId" occurrences in the HTML)

Expected Behavior

Output (terminal and HTML report) restricted to the single matching session — Sessions: 1. If the ID doesn't match any session, an explicit "No sessions found" message (which other filters do print).

Actual Behavior

$ codemie analytics --session e455c8d6-b265-45be-a8f8-af454b656aa6
============================================================
ANALYTICS SUMMARY
============================================================
Sessions: 363
...

Workaround: --branch <branch-name> filters correctly:

$ codemie analytics --branch EPMCDME-13479_pagination-tests-remaining-tabs
Sessions: 1

Possibly related: session IDs appear in two forms in exported data — plain UUIDs and completed_<uuid>-prefixed (from different providers). Tested with the plain UUID form; the ID was valid and present in the export.

No related ERROR/WARN entries in ~/.codemie/logs/ — the filter fails silently.

Environment

Field Value
OS Darwin 25.5.0 arm64 (macOS)
Node.js v20.19.4
npm 10.8.2
CodeMie CLI 0.9.0
Shell /bin/zsh
Terminal tmux

Installed Agents

  • CodeMie Code 0.0.47
  • Claude Code 2.1.199
  • Gemini CLI 0.50.0
  • OpenAI Codex CLI 0.144.3

CodeMie Doctor Output

All checks passed (Node v20.19.4, npm 10.8.2, Python 3.14.6, uv 0.11.26, AWS CLI 2.27.57; active profile: anthropic-subscription).

Full Debug Logs

Not attached — logs contain no entries related to this bug (silent failure). Can provide on request.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions