Remote trigger returns HTTP 500 when cloning private GitHub repo

Resolved 💬 2 comments Opened Apr 6, 2026 by collectiveobjective Closed May 17, 2026

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

  1. Install the Claude GitHub App on a user account
  2. Grant it access to a specific private repository (read/write permissions to code, checks, discussions, issues, PRs, hooks, and workflows)
  3. Repository access set to "Only select repositories" with the target repo selected
  4. Create a remote trigger with a git_repository source pointing to that repo
  5. 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_repository source run successfully (HTTP 200) using the same environment_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 via gh CLI with admin permissions
  • Tested multiple times over ~16 hours — consistently fails
  • Tried both URL formats (https://github.com/user/repo and https://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_011CZnDeJnE643xQkqHaLoeF
  • req_011CZnDyLn57Q3LdRR3fbiAv
  • req_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.

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗