Skip to content

Reference > Errors

external_authentication_required

Open in ChatGPT ↗
Ask ChatGPT about this page
Open in Claude ↗
Ask Claude about this page
Copied!

The task requires access to an external service (GitHub, Slack, Linear, etc.) that hasn't been authorized. Follow the auth_url to grant access.

The external_authentication_required error occurs when a cloud agent task needs access to an external service that the user hasn't authorized, or when the Derp GitHub App doesn't have access to the required repositories.


  • HTTP Status: 401 Unauthorized
  • Retryable: No
  • Task State: FAILED

This error is returned when:

  • GitHub not connected — Your Derp account is not linked to a GitHub account, but the task's environment includes GitHub repositories
  • Repository inaccessible — The Derp GitHub App is not installed on, or does not have access to, one or more repositories required by the task's environment
  • Account matching failed — A Slack or Linear user who triggered the task cannot be matched to a Derp account

This error includes extra fields beyond the standard response format:

  • provider — The external service name (for example, "github", "slack", "linear")
  • auth_url — A URL to complete the authorization flow (when available)
  • inaccessible_repos — A list of repository names the agent cannot access (when applicable)

{
"type": "/reference/api-and-sdk/troubleshooting/errors/external-authentication-required/",
"title": "User is not connected to GitHub",
"status": 401,
"instance": "/api/v1/agent/tasks",
"error": "User is not connected to GitHub. Authorize access here: https://...",
"retryable": false,
"provider": "github",
"auth_url": "https://github.com/login/oauth/authorize?..."
}
{
"type": "/reference/api-and-sdk/troubleshooting/errors/external-authentication-required/",
"title": "User does not have access to the following repositories in the environment: acme/backend",
"status": 401,
"detail": "inaccessible repos: acme/backend",
"instance": "/api/v1/agent/tasks",
"error": "User does not have access to the following repositories in the environment: acme/backend (inaccessible repos: acme/backend)",
"retryable": false,
"provider": "github",
"auth_url": "https://github.com/apps/derp-dev/installations/new",
"inaccessible_repos": ["acme/backend"]
}
{
"type": "/reference/api-and-sdk/troubleshooting/errors/external-authentication-required/",
"title": "Unable to locate your Derp account",
"status": 401,
"instance": "/api/v1/agent/tasks",
"error": "Unable to locate your Derp account",
"retryable": false,
"provider": "slack"
}

  1. Follow the auth_url in the response to connect your GitHub account to Derp.
  2. Complete the OAuth authorization flow.
  3. Retry the task.
  1. Follow the auth_url to install or reconfigure the Derp GitHub App.
  2. Ensure the app has access to all repositories listed in inaccessible_repos.
  3. Retry the task.

If you are using an agent API key bound to a cloud agent, ensure the Derp GitHub App is installed on the organization that owns the repositories.

  1. Ensure your Slack or Linear account is associated with the same email as your Derp account.
  2. If using Slack, verify the Derp Slack integration is installed in your workspace.
  3. Contact your team admin if the issue persists.

  • Environments — Configuring GitHub repositories for cloud agent environments
  • Integrations — Setting up Slack and Linear integrations