Where does the bug appear (feature/product)?
Cursor IDE
Describe the Bug
On macOS, gh works in Agent mode but fails in Ask mode in the same repo/session.
In Ask mode:
gh auth status says the keyring token is invalid
gh pr view <public PR URL> fails with Post "https://api.github.com/graphql": Forbidden
In Agent mode:
gh auth status succeeds
gh pr view succeeds
gh api graphql -f query='{ viewer { login } }' succeeds
This suggests Ask mode shell runs in a restricted context that cannot access the same keychain-backed gh credentials as Agent mode.
Steps to Reproduce
Use gh cli in Ask mode and then in Agent mode
Expected Behavior
Ask mode should either support the same local gh auth context for read-only commands, or clearly report that gh auth is unavailable in Ask mode due to sandboxing.
Operating System
MacOS
Version Information
Version: 3.0.13 (Universal)
VSCode Version: 1.105.1
Commit: 48a15759f53cd5fc9b5c20936ad7d79847d914b0
Date: 2026-04-07T03:05:17.114Z
Layout: editor
Build Type: Stable
Release Track: Default
Electron: 39.8.1
Chromium: 142.0.7444.265
Node.js: 22.22.1
V8: 14.2.231.22-electron.0
OS: Darwin arm64 25.4.0
Does this stop you from using Cursor
No - Cursor works, but with this issue