Skip to content

[BUG] [v0.0.7] [CLI] cortex pr <n> --comments falls back to recommending gh or the browser instead of listing comments in-terminal #53274

@kiannidev

Description

@kiannidev

Project

cortex

Description

cortex pr <number> --comments is documented as a way to view PR comments, but unless the separate GitHub CLI (gh) is installed and working, the command does not print comment threads in the terminal. After the usual PR metadata block, it prints Fetching PR comments… and then a Note telling the user to install gh for “full” viewing, plus an Alternative: link to open the PR in a web browser.

For users who rely on Cortex alone (or who have a GitHub token configured for Cortex but not gh), this feels like a missing feature: the flag suggests in-terminal reading, yet the tool delegates to other programs instead of using the GitHub API (or existing client code) to fetch and render issue/PR comments itself.

Error Message

Debug Logs

System Information

OS:windows

Screenshots

https://github.com/kiannidev/screens/blob/main/32b0d2f9ad972437a3c8fbef901a56a8.png

Steps to Reproduce

  1. Ensure gh is not available (or fails), while cortex can still reach GitHub for other PR commands if applicable.
  2. Run cortex pr <n> --comments for a PR that has comments on GitHub.
  3. Observe that only the fallback message and URL appear—not the comments.

Expected Behavior

--comments should list PR comments in the terminal using Cortex’s own GitHub integration (token / API), similar to how PR metadata is fetched—without requiring gh or a browser for basic reading.

Actual Behavior

If gh pr view --comments does not succeed, Cortex does not fetch comments itself; it only recommends installing gh or visiting the PR URL.

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    duplicateThis issue or pull request already exists

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions