anthropics / anthropics/claude-code
[BUG] Routines: GitHub event triggers never create a run for one account (issues.labeled/opened and pull_request.labeled), while Run now and /fire work
- Vorherrschende Sprache
- Python
- Sterne
- 145k
- Forks
- 23.1k
- PR-Merge-Kennzahlen
- PR-Kennzahlen ausstehend
Beschreibung
### Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet (closest is #48845, which describes a PR-open trigger never firing after a GitHub account change; this report has a fuller matrix and may share the root cause)
- [x] This is a single bug report
- [x] I am using the latest version of Claude Code
### What's Wrong?
For one claude.ai account, **no GitHub event trigger on any routine ever creates a run**, while **Run now** and the API trigger (`POST …/fire`) start runs immediately every time. The same user reports GitHub triggers working on other claude.ai accounts and other repositories.
Repository: `SectorLabs/jarvis-backend` (private, GitHub org `SectorLabs`). The Claude GitHub App is installed for the org and the repo appears in the claude.ai repository picker; cloud sessions clone and push it without problems.
Test matrix (all UTC, all events emitted **after** the trigger existed; runs checked with `GET /v1/code/sessions?trigger_id=…` 2–25 minutes later):
| Date | Time | GitHub event | Routine / trigger | Run |
| --- | --- | --- | --- | --- |
| 2026-09-11 | 16:07:53 | issues.labeled | `trig_01KNV3wUchPGzhPMma5CWqJe`, UI trigger "Issue: Labeled", filter Labels is one of `ai-build` (saved 16:06:18) | none |
| 2026-09-14 | 04:51:35 | issues.labeled | same | none |
| 2026-09-14 | 08:52:07 | issues.labeled | same routine, UI trigger with the filter removed | none |
| 2026-09-14 | 09:47:56 | issues.opened | API webhook trigger `cd6cde19-78ce-425b-a04d-de2a7291f70a` (no filter) | none |
| 2026-09-14 | 09:48:42 | issues.labeled | API webhook trigger `3ce9ab58-a749-461a-8b4e-ff60855d5fa6` (no filter) | none |
| 2026-09-14 | 09:54:19 | **pull_request.labeled** (documented event) | API webhook trigger `e4f7609d-527f-4197-a0eb-bc5be65545e4` (no filter) | none |
| 2026-09-14 | 11:04:13 and 11:07:24 | issues.labeled | **fresh no-op routine** `trig_011Sq9jZgcWi3mRsQkpYfzyu` (created 11:03:38, enabled, prompt only echoes the trigger), API webhook trigger `bb0bf75d-d7ea-4e1c-a564-813f3535f6df` (no filter) | none |
Runs that **did** start on `trig_01KNV3wUchPGzhPMma5CWqJe`: `cse_01AFsvztp4bLdQCgfLVNcYgh` (Run now), `cse_017Fub9MApji4pJ8jGnvEFHu` and `cse_01SX3gXJ4XfFk5LtGoEiUrF2` (API `run` with text). Fire text arrived correctly as a `` block.
One lead: every webhook trigger is stored with the scope lower-cased — `"scope_id": "github.com/sectorlabs/jarvis-backend"` in the create response, and the UI card also shows `sectorlabs/jarvis-backend` — while GitHub sends `repository.full_name` = `SectorLabs/jarvis-backend`. If event matching is case-sensitive, no event from an organisation with capital letters in its login can ever match.
### What Should Happen?
Adding the `ai-build` label to an issue (or, for the control, labelling a PR) should create a run session for the routine within seconds, as it does for Run now and `/fire`.
### Error Messages/Logs
```shell
# No error anywhere. list_runs stays empty; the routines page shows no dropped-event or cap indicator.
# Webhook trigger creation succeeded, e.g.:
POST /v1/code/webhook-triggers
{"routine_trigger_id":"trig_011Sq9jZgcWi3mRsQkpYfzyu","source":"github","hook_type":"app","scope_id":"SectorLabs/jarvis-backend","events":["issues.labeled"],"filter":{"clauses":[]}}
-> 200 {"trigger":{"trigger_id":"bb0bf75d-d7ea-4e1c-a564-813f3535f6df","scope_id":"github.com/sectorlabs/jarvis-backend","events":["issues.labeled"],"hook_type":"app",...}}
# Possibly related: adding two other private repos of the same org as routine sources is refused although the
# connected GitHub identity can read them:
POST /v1/code/triggers/trig_01KNV3wUchPGzhPMma5CWqJe (sources += SectorLabs/Jarvis-planning-docs, SectorLabs/jarvis-developer-tools)
-> 403 {"error":{"type":"permission_error","message":"You don't have access to a repository this routine uses."}}
request ids req_011Cf2y6bwUufS8ZiiCUYn3P, req_011Cf33bb1hrGADbCqPX4ckx
```
### Steps to Reproduce
1. On this account, create a routine whose only repository is `SectorLabs/jarvis-backend` (done both through the API and with a UI-configured trigger; the minimal one is `trig_011Sq9jZgcWi3mRsQkpYfzyu`, prompt "reply `trigger received: …` and end").
2. Attach a GitHub trigger: Issue: Labeled with no filter (UI), or `POST /v1/code/webhook-triggers` as above.
3. Add a label to an issue in that repo (or label a PR for the `pull_request.labeled` control).
4. Check `GET /v1/code/sessions?trigger_id=` and the routine page: no run, no comment, nothing.
5. Click Run now or call `/fire`: a run appears within seconds.
### Claude Model
Claude Opus 5 (build routine) and Claude Sonnet 5 (no-op routine)
### Is this a regression?
No, this never worked on this account
### Last Working Version
_No response_
### Claude Code Version
Routines on claude.ai/code (web); local CLI 2.1.142
### Platform
Claude Code on the web (claude.ai/code routines)
### Operating System
macOS
### Terminal/Shell
n/a (web)
### Additional Information
- Same user: GitHub triggers work on other claude.ai accounts and other repositories.
- Inside routine sessions for this account the git token is scoped to the routine's listed repo only (401 on sibling private repos), and `gh` was not installed in the custom environment (now added). Unrelated to delivery but observed in the same runs.
- Independent report with the same symptom on a different org: https://github.com/dsj1984/mandrel-platform/issues/434
- Happy to share account details privately if a support engineer reaches out.
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Rechercherichtung
Start at the webhook-trigger creation and GitHub event-dispatch paths behind POST /v1/code/webhook-triggers, using the listed issues.labeled and pull_request.labeled reproductions. Compare the stored lower-cased scope_id with GitHub's repository.full_name and verify sessions through GET /v1/code/sessions; done when matching events create routine runs while Run now and /fire remain unaffected.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- github, python
- Bereich
- api, backend
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Aktiv
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 45/100