Repository navigation
Description
rtk gh issue view --comments and rtk gh pr view --comments silently discard all comments. The output shows only the issue/PR body with no comments section, which causes Claude Code to conclude "no comments" — a false claim when comments exist.
This is worse than truncation (#354, #188) because the data is never fetched at all.
Reproduction
On any issue with comments:
# Raw gh — shows 2 comments
gh issue view 187 --repo Dicklesworthstone/beads_rust --comments
# Through rtk — no comments visible
rtk gh issue view 187 --repo Dicklesworthstone/beads_rust --comments
Claude Code with the rtk hook sees the second output and reports:
No comments at all — the maintainer never responded.
The issue actually has 2 comments including a maintainer reply.
Cause
view_issue hardcodes --json number,title,state,author,body,url — comments is not in the field list:
Lines 688 to 689 in 4792008
| "--json", | |
| "number,title,state,author,body,url", |
The --comments flag is appended as an extra arg, but in --json mode gh ignores it and only returns the listed fields. The formatting code then only processes those 6 fields, so comments are structurally absent from the output.
view_pr has the same issue — its JSON fields don't include comments either.
For PR view, should_passthrough_pr_view triggers passthrough on --json, --jq, and --web, but not --comments:
Lines 286 to 289 in 4792008
| fn should_passthrough_pr_view(extra_args: &[String]) -> bool { | |
| extra_args | |
| .iter() | |
| .any(|a| a == "--json" || a == "--jq" || a == "--web") |
view_issue has no passthrough check at all.
Impact
With the rtk hook active, Claude Code has no way to know it's running through rtk. It trusts the output and makes false conclusions about issues having no responses. This is particularly harmful when triaging issues or following up on bug reports — the agent acts on incorrect information.
Suggestion
The simplest fix would be to treat --comments as a passthrough trigger (like --json/--jq/--web), for both issue view and pr view. When a user explicitly asks for comments, correctness matters more than token savings.
Related
- gh PR comments/reviews and git diff output still truncated, causing repeated fetch attempts by AI agents #354 — gh PR comments/reviews truncated (different: truncation vs never fetched)
- Impossible to get full Github Issue content, even by getting the full raw markdown #188 — GitHub issue content truncation (different: body truncation, not comments)
Environment
- rtk 0.30.1 (master, commit 48e53cb)
- gh 2.74.1
- Claude Code
- Windows 11
Activity
cderv commentedon Mar 20, 2026
For now, we've worked around this by excluding
ghfrom the rtk hook entirely viaconfig.toml:This ensures
ghruns unproxied, so--commentsworks correctly. Still worth fixing the filter — both for users who don't configure exclusions, and so we can re-enable rtk's token optimization on gh commands that do work well.pszymkowiak commentedon Mar 20, 2026
🔍 Automated Triage
bughighSummary
rtk gh issue/pr view --comments silently drops all comments because the JSON field list omits 'comments' and --comments isn't a passthrough trigger; fix by adding --comments to passthrough checks for both issue and PR view.
📁 Relevant files
src/gh_cmd.rsTriaged automatically by wshm · This is an automated analysis, not a human review.
fix(gh): passthrough --comments flag in issue/pr view
mvanhorn commentedon Mar 21, 2026
Implemented in #775 - added --comments to passthrough triggers in both view_pr and view_issue, so gh returns full comment data instead of silently dropping it.
aeppling commentedon Mar 21, 2026
Hello, #775 has been merged and will be available in next release.
Next release should come by the end of the weekend or on Monday.
Closing this issue, thanks for this clean report
fix(gh): passthrough --comments flag in issue/pr view
fix(gh): passthrough --comments flag in issue/pr view
fix(gh): passthrough --comments flag in issue/pr view
fix(gh): passthrough --comments flag in issue/pr view