Where does the bug appear (feature/product)?
Cloud Agent (GitHub, Slack, Web, Linear)
Describe the Bug
Component: Cloud Agents — ManagePullRequest tool (and PR-resolution generally)
Environment:
- Cloud Agent run (source: desktop), GitHub-connected repo
- Run-registered repo owner casing: lowercase; GitHub canonical: mixed-case
- (Run ID available privately on request.)
Summary:
update_pr validates that the target PR belongs to the current repo by comparing owner/repo slugs case-sensitively. The run’s registered repoUrl is stored lowercase (exampleorg), while the GitHub API returns the canonical casing (ExampleOrg). Since ExampleOrg ≠ exampleorg, the check rejects the operation even though both refer to the same repository (GitHub slugs are case-insensitive).
Steps to Reproduce
- Have a Cloud Agent whose registered
repoUrlowner casing differs from GitHub’s canonical casing. ManagePullRequest action=create_pr …→ succeeds, returns URL…/ExampleOrg/examplerepo/pull/1234.ManagePullRequest action=update_pr branch_name=<branch> body=…→ fails.- Also fails with
action=update_pr pr_url=https://github.com/ExampleOrg/examplerepo/pull/1234 ….
Expected Behavior
Expected: update_pr succeeds; owner/repo matching is case-insensitive (or done by GitHub repo node ID), consistent with create_pr
Actual: Error managing PR: PR URL must belong to the current repository on every update_pr variant (both branch_name and pr_url forms).
Operating System
MacOS
Version Information
Version: 3.12.30 (Universal)
VS Code Extension API: 1.128.0
Commit: 63a2996a10d9e476b6c28e951dd7691d9c0cf480
Date: 2026-07-21T22:50:03.568Z
Layout: Agent Window
Build Type: Stable
Release Track: Default
Electron: 40.10.3
Chromium: 144.0.7559.236
Node.js: 24.15.0
V8: 14.4.258.32-electron.0
xterm.js: 6.1.0-beta.256
OS: Darwin arm64 25.5.0
Additional Information
Evidence it’s a casing issue, not the local git remote:
- Rewriting the local git remote to canonical casing (
git remote set-url origin …/ExampleOrg/examplerepo) did not fix it — the comparison reads the run-registeredrepoUrl(confirmed viacursor-cloud run-info), notgit remote. create_prworks because it targets the registeredrepoUrldirectly without cross-checking against the canonical PR URL.
Suggested fix:
- Normalize both sides (lowercase owner/repo) before comparing, or match on the GitHub repository node ID rather than the slug string.
- Apply the same normalization anywhere else a PR is validated against the current repo (
post_comment,resolve_comment,get_ci_status,set_pr_status). - Optionally, store the run’s
repoUrlusing GitHub’s canonical casing at agent-creation time so downstream comparisons are consistent.
Does this stop you from using Cursor
Sometimes - I can sometimes use Cursor