[BUG] Scheduled trigger fails with github_repo_access_denied for private repos despite GitHub connector being connected
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?
Scheduled triggers fail immediately with github_repo_access_denied when configured to use a private GitHub repository. The agent never starts and no session logs are generated, making it impossible to diagnose from the user side.
I have performed a full authentication reset: signed out of both claude.ai and GitHub in the browser, disconnected the GitHub connector, and reconnected via the Claude desktop app. The reconnect flow used the correct OAuth app. Despite this, the trigger continues to fail with the same error immediately.
To isolate the issue I created three test triggers:
- No GitHub source -> runs successfully
- Public GitHub repo (anthropics/anthropic-sdk-python) -> runs successfully
- Private GitHub repo -> fails immediately with github_repo_access_denied
This confirms the trigger infrastructure is working and the issue is specific to private repository authentication, maybe the GitHub connector token is not being passed correctly to the scheduled trigger auth check on Anthropic's backend?
The original trigger auto-paused overnight after a failed run. Creating a brand new trigger did not resolve the issue.
What Should Happen?
The trigger should clone the private repo and start the agent session.
Error Messages/Logs
{
"error": {
"message": "GitHub repository access check failed — re-authorize GitHub in settings",
"reason": "github_repo_access_denied",
"type": "invalid_request_error"
},
"request_id": "req_011Ca298B5shsVTxNUXEwWKB"
}
Steps to Reproduce
- Clear shell auth
unset ANTHROPIC_API_KEY
claude logout
- Confirm key iun shell config
grep -n "ANTHROPIC\|claude" ~/.zshrc
- Sign back into Claude Code cleanly
claude login
confirmed correct account
4.Disconnect GitHub connector
5 Reconnect GitHub
- Test the private repo trigger
Claude Model
Sonnet (default)
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.104 (Claude Code)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
iTerm2
Additional Information
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗