Skip to content

gstack-global-discover misses Kimi Code and OMP sessions — only scans ~/.claude, ~/.codex, ~/.gemini #2917

Closed

Description

@richardiitse

Summary

gstack-global-discover only scans three session stores — ~/.claude/projects, ~/.codex/sessions, and ~/.gemini — so /retro global silently undercounts any week where other agent CLIs were used. On my machine this week it missed Kimi Code and OMP sessions entirely.

This is the same class of bug as #1977 (missed Antigravity CLI sessions), but for two stores that aren't Gemini-adjacent at all.

Evidence

Running /retro global for a 7d window reported:

Discovered: 34 CC sessions, 178 Codex sessions, 0 Gemini sessions
→ 5 unique repos

Scanning the session stores directly for the same window found two more sessions the tool never looked for:

Tool Sessions in window Verified by
Kimi Code 1 659 wire events, 2026-09-16T15:06 → 2026-09-17T12:04
OMP 1 48 events, 2026-09-16T01:57Z → 02:23Z

Both were real working sessions on a repo the retro already tracked, so they belong in the same per-repo rollup — the repo's true session count was 132, not 130.

--help confirms there is no flag to opt into other tools; the omission is structural, not configuration:

Usage: gstack-global-discover --since <window> [--format json|summary]

  --since <window>   Time window: e.g. 7d, 14d, 30d, 24h
  --format <fmt>     Output format: json (default) or summary
  --help             Show this help

Store layouts

Kimi Code — ~/.kimi-code/

  • workspaces.json maps workspace id → { root, name, created_at, last_opened_at }. root is the absolute working directory, so repo attribution needs no path guessing.
  • session_index.jsonl — one JSON object per session: { sessionId, sessionDir, workDir }. workDir is again the absolute cwd.
  • sessions/<workspace_id>/<session_id>/ holds state.json (cwd, createdAt, updatedAt as epoch ms) and agents/main/wire.jsonl (one event per line, created_at ISO timestamps).

session_index.jsonl + state.json's updatedAt is enough for both window filtering and cwd resolution — no need to parse wire.jsonl unless you want event-level activity like the CC scanner does.

OMP — ~/.omp/agent/sessions/

  • One directory per workspace, named from the path with separators replaced by - (e.g. -Documents-projects-myrepo). Note this is lossy — it is relative to $HOME and collapses separators, so reversing it to a path is unreliable. Prefer the cwd recorded inside the session file.
  • Each session is <ISO8601-with-dashes>_<uuid>.jsonl, one event per line with timestamp ISO fields. The filename timestamp alone is enough for window filtering.

One caveat worth encoding: OMP writes a per-launch log under ~/.omp/logs/ even when no session is created. I had a launch in-window that produced only a single proxy-debug line and no session file. Counting log files rather than session .jsonl files would overcount by one here.

Why it matters

/retro global's whole premise is that it sees across every AI tool you used — the report literally has a "Tool Usage Analysis" section that draws behavioral conclusions from the per-tool split. When a tool is invisible, the retro doesn't just lose a number; it draws the wrong conclusion. In my case the two missing sessions were both design/IA review passes on the same repo, which is exactly the signal a cross-tool retro exists to surface.

It also fails silently. There is no "0 Kimi sessions" line to notice, so the omission is indistinguishable from not having used the tool.

Suggested fix

The tool list is hardcoded in ~10 places in bin/gstack-global-discover.ts:

  • L20 — tool: "claude_code" | "codex" | "gemini"
  • L28, L36–38 — sessions / tools shape
  • L517, L533–534 — sessionCounts init and sort key
  • L549–552 — scanner invocation and concat
  • L565–567, L574–576 — repo counts and totals
  • L587, L591–595 — summary formatting

Adding a fourth tool today means touching all of them, which is probably why #1977 has sat open. A registry would make each new store a single entry plus a scanner:

const SCANNERS = [
  { id: "claude_code", label: "CC",     scan: scanClaudeCode },
  { id: "codex",       label: "Codex",  scan: scanCodex },
  { id: "gemini",      label: "Gemini", scan: scanGemini },
  { id: "kimi_code",   label: "Kimi",   scan: scanKimiCode },
  { id: "omp",         label: "OMP",    scan: scanOmp },
] as const;

…with counts derived by iterating SCANNERS instead of naming fields. That also fixes the reporting asymmetry: emit every registered tool's count (including zeros) so a missing store is visibly zero rather than absent.

Happy to send a PR for the two scanners plus the registry refactor if you'd take it.

Environment

  • gstack v1.87.4.0 (global-git install), macOS 15 (Darwin 25.6.0)
  • Kimi Code and OMP both installed with active session stores

Activity

  1. capy-ai commented on Oct 11, 2026

    @capy-ai
    Contributor

    Thanks @richardiitse for the idea. In the Oct 11 triage we grouped the open feature requests by theme so related asks get built together instead of one at a time. This one is part of the New hosts theme in TODOS.md (https://github.com/garrytan/gstack/blob/50d020ad9/TODOS.md#L54-L69), tracked as a whole in #3137. Closing it here so the open list stays actionable; it isn't rejected, and the theme credits every linked reporter when it's picked up.

  2. added
    parked
    on Oct 25, 2026
  3. capy-ai commented on Oct 25, 2026

    @capy-ai
    Contributor

    Reopened under the parked label: this is tracked in the New hosts theme in TODOS.md and tracking issue #3137 (https://github.com/garrytan/gstack/blob/main/TODOS.md#p3-feature-themes-from-the-wave-9-triage-filed-2026-10-11), and what fixes it is the host-config work that adds installable hosts; each new host lands as its own ./setup --host <name> arm. Closed-but-tracked read as closed, so parked issues now stay open until they ship, are duplicates, or are declined (https://github.com/garrytan/gstack/blob/main/docs/triage.md).

  4. added
    S3
    enhancement
    on Oct 31, 2026
  5. capy-ai commented on Oct 31, 2026

    @capy-ai
    Contributor

    Thanks @richardiitse for the report and for spelling out both store layouts, which is what made this quick to build. #3740 adds Kimi Code (~/.kimi-code/session_index.jsonl, windowed by state.json updatedAt, attributed by workDir) and OMP (~/.omp/agent/sessions/*/*.jsonl, windowed by file mtime, attributed by the cwd in the session file; ~/.omp/logs is never read) to gstack-global-discover, and /retro global now reports every discovered tool. It doesn't parse wire.jsonl for event-level activity; each indexed session counts once. This issue closes when #3740 merges.

  6. capy-ai commented on Oct 31, 2026

    @capy-ai
    Contributor

    Thanks again for spelling out both store layouts, @richardiitse. Following up on the note above: we decided not to land #3740 after all. Kimi Code and OMP are used by few gstack users, and counting them barely moves the /retro global numbers, so the extra code isn't worth carrying. Closing as not planned.

  7. reopened this on Nov 1, 2026
  8. capy-ai commented on Nov 1, 2026

    @capy-ai
    Contributor

    Fixed in #3740, released in v1.92.20.0: /retro global now counts Kimi Code and OMP sessions per repo. This was closed as not planned earlier; that decision was reversed and the fix landed. Thanks for the report.

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

    S3enhancementparked

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions