[BUG] Desktop: self-managed GitLab MRs bind but CI checks fail with "Unknown GitHub host", while the no-CI-polling rule still applies
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
In the desktop app's Code tab, a merge request on a self-managed GitLab instance binds to the session: the app log shows [GitHubPrManager] Bound gitlab #<iid> to session …, and get_status returns the MR's number, state and branches. Its CI checks are never read:
"checks": { "available": false, "error": "Unknown GitHub host \"gitlab.example.com\"." }
So the PR monitor never sends a ci-monitor-event, and Auto-fix does nothing for it. Meanwhile every session's system prompt says to "never schedule or poll CI checks yourself (CronCreate, ScheduleWakeup, /loop, Monitor, gh polling)", so Claude declines to watch the pipeline even when asked, and nothing else watches it. All that's left is re-running a one-off status check by hand.
glab is installed and authenticated for the host (glab api --hostname gitlab.example.com projects/<id>/pipelines/<id> works), and the app already reads the MR's number, state and branches through glab. Only the checks lookup appears to go through GitHub-only code, like the gh lookup in #96503.
What Should Happen?
Either of these would fix it:
- Read CI for GitLab bindings through glab (the MR's pipelines, their jobs, and child pipelines started by trigger jobs), so
checks.availableis true and Auto-fix /ci-monitor-eventwork on gitlab.com and self-managed hosts alike. - Until then, apply the no-polling rule only when the bound PR's checks are available (the fix #98774 proposes for Azure DevOps), so Claude can poll when the user asks.
Also useful: watching a standalone pipeline that has no MR, e.g. one started with glab ci run. Our team runs scoped E2E suites that way.
Error Messages/Logs
# ~/Library/Logs/Claude/main.log
[info] [GitHubPrManager] Bound gitlab #<iid> to session local_<id>
# mcp__ccd_pr__get_status
"pr": { "number": <iid>, "url": "https://gitlab.example.com/<group>/<project>/-/merge_requests/<iid>", "host": "gitlab.example.com", "state": "open" },
"checks": { "available": false, "error": "Unknown GitHub host \"gitlab.example.com\"." },
"monitor": { "auto_fix": false, "address_comments": false }
Steps to Reproduce
- Authenticate glab for a self-managed GitLab host:
glab auth login --hostname gitlab.example.com. - Open a Code-tab session on a repo whose remote is on that host.
- Push a branch that has an open MR (or call
bind_prwith the MR URL). The MR appears in the PR bar. - Ask Claude to call
get_status:checks.availableis false with "Unknown GitHub host". - Ask Claude to tell you when the MR pipeline finishes: it declines to poll and quotes the system-prompt rule.
Claude Model
Opus
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.289 (bundled with Claude desktop 2.26454.0)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Other
Additional Information
- Related: #98774 (the same rule on Azure DevOps, where the monitor can't bind at all) and #96503 (a GitHub-only code path on a gitlab.com binding).
/loopworks for this in the CLI, so the gap is desktop-only.- Workaround: a function-hooks plugin that polls
glab apiwith$.clock.everyand reports through$.ui.status/$.ui.toast. It can tell the person a pipeline finished, but it can't wake the session, so Auto-fix still isn't possible.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗