GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — stats --project '' flag does not filter by current project · Issue #9958 · anomalyco/opencode

stats --project '' flag does not filter by current project #9958

New issue
Copy link
New issue
Copy link
Closed as duplicate
Closed as duplicate
stats --project '' flag does not filter by current project#9958
Copy link
Assignees
rekram1-node

Description

@libardoram
libardoram
opened on Jan 22, 2026
Issue body actions

Bug Description

The opencode stats --project '' command is documented to filter stats for the current project, but it shows global stats instead.

Steps to Reproduce

  1. Navigate to a project directory with OpenCode sessions:

    cd /path/to/project
  2. Run the stats command with empty project filter:

    opencode stats --project ''

Expected Behavior

According to opencode stats --help:

--project     filter by project (default: all projects, empty string: current project)

The command should show stats only for sessions in the current project directory.

Actual Behavior

The command shows stats for all 123 sessions globally, regardless of the current directory.

Additional Context

  • All sessions appear to have projectId: "global" when checked via opencode session list --format json
  • Even when running from different project directories, the stats remain the same
  • Using a full path like opencode stats --project /path/to/project returns 0 sessions

Environment

  • OpenCode version: 1.1.31
  • OS: macOS
  • Shell: zsh

Possible Cause

It appears that either:

  1. The project tracking isn't working correctly (all sessions marked as 'global')
  2. The --project '' flag filtering logic has a bug
  3. Projects need to be explicitly initialized with /init to be tracked properly (not documented)

Would appreciate clarification on the expected behavior and a fix for the filtering.

Reacted by krauhen
Reacted by krauhen

Activity

  1. github-actions
    assigned
    rekram1-node
    on Jan 22, 2026
  2. github-actions commented on Jan 22, 2026

    @github-actions
    github-actionsBot
    on Jan 22, 2026 – with GitHub Actions
    Contributor
    More actions

    This issue might be a duplicate of existing issues. Please check:

    • Sessions are now mixed with home directory session list, disregarding which directory you're in #3551: Sessions are now mixed with home directory session list, disregarding which directory you're in
    • sessions and project files are confused #9224: sessions and project files are confused
    • [FEATURE]: Filter TUI session list by current directory/worktree #9881: [FEATURE]: Filter TUI session list by current directory/worktree (related to current project filtering)

    These issues describe similar problems with sessions being mixed across directories and the inability to filter by current project/directory. Your issue specifically focuses on the --project ''​ flag not filtering by current project, which may be related to these broader project/directory filtering challenges.

    Feel free to ignore if your specific case differs from these issues.

  3. libardoram
    closed this as a duplicateof [FEATURE]: Filter TUI session list by current directory/worktree #9881 on Jan 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @rekram1-node
    rekram1-node

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.