Remote trigger returns HTTP 500 when cloning private GitHub repo
Description
Remote triggers that reference a private GitHub repository via sources.git_repository.url consistently return HTTP 500 ("An internal server error occurred") when run.
Steps to reproduce
- Install the Claude GitHub App on a user account
- Grant it access to a specific private repository (read/write permissions to code, checks, discussions, issues, PRs, hooks, and workflows)
- Repository access set to "Only select repositories" with the target repo selected
- Create a remote trigger with a
git_repositorysource pointing to that repo - Run the trigger via the API or CLI
Expected: The trigger clones the repo and executes the prompt
Actual: HTTP 500 with {"error":{"message":"An internal server error occurred","type":"api_error"}}
Diagnostic info
- Triggers without a
git_repositorysource run successfully (HTTP 200) using the sameenvironment_id, MCP connections, and session config - The GitHub App installation is confirmed working — repo is listed under "Only select repositories" with correct permissions
- The repo exists, is private, has commits pushed to
origin/main, and is fully accessible viaghCLI with admin permissions - Tested multiple times over ~16 hours — consistently fails
- Tried both URL formats (
https://github.com/user/repoandhttps://github.com/user/repo.git) — same result - Created fresh triggers with identical config — same result
- Updated existing triggers with new config — same result
- Environment ID and all other config fields are valid (confirmed by successful no-repo triggers using the same environment)
Request IDs
These failed trigger runs may help with server-side log lookup:
req_011CZnDeJnE643xQkqHaLoeFreq_011CZnDyLn57Q3LdRR3fbiAvreq_011CZnE4F3RauojQmrfy4WMo
Environment
- Claude Code CLI (terminal)
- macOS (Darwin 24.6.0)
- GitHub user account (not org)
- Private repository with 4 commits on main
Workaround
Removed the git_repository source from the trigger config. The trigger now runs using only MCP connections (Gmail, Google Calendar) and outputs via Gmail draft instead of writing to repo files. This works but limits the automation to read-only operations — it cannot update workspace files without repo access.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗