Skip to content
86% off$349 $48.86code BF2026

Guides

Claude Code web error: "An error occurred while executing"

Claude Code on the web fails after 'Fetching repository...' with 'An error occurred while executing Claude Code.' What to try, and a local workaround.

TroubleshootingUpdated 6 min read

On this page

You start a Claude Code session on the web and it stops right after "Fetching repository..." with this:

text
An error occurred while executing Claude Code. You can try again by sending a new message or starting a new session.

The message is generic. It names no repo, permission or step, so it doesn't tell you what failed.

Why it happens

We can't give you a confirmed cause. Anthropic hasn't published an explanation for this exact message that we could find. What we have is a pattern from two issues on the Claude Code GitHub repository (#18452 and #17888, last seen January 2026):

  • The session shows "Fetching repository..." and then fails with the error above.
  • The repository is private.
  • The Claude Code CLI and the VS Code extension work with the same repo.

That points at the web session's repository setup rather than your code, but treat it as a reading of the reports, not a diagnosis. Anthropic's docs say a cloud session creates an isolated virtual machine and clones your GitHub repository into it. The reports fail at the point where that clone would happen. The docs also say your GitHub authentication is managed through a secure proxy, so your local git credentials don't take part. That would explain why the same repo works locally.

Possible causes, most likely first:

Possible causeSymptomWhat to do
Web session can't clone a private repo (matches the reports)Fails right after "Fetching repository..."Check GitHub App access, then work locally
Claude GitHub App lacks access to that repo or orgRepo missing from the picker, or fails on fetchGrant access on GitHub
Org requires SSO and you haven't authorized ClaudePrivate org repos hidden or inaccessibleAuthorize the app for that org
Temporary service incidentMany sessions fail, public repos tooCheck the status page and wait
Unknown server-side bugEverything above is fineReport it with details

Step-by-step fixes

1. Retry once, then start a fresh session

Send a new message in the same session. If it fails again, start a new session on the same repo. That is the only recovery the error itself offers. If the new session stops at the same "Fetching repository..." step, further retries are unlikely to help.

2. Check the Claude GitHub App's access

Anthropic's GitHub integration page says that if Claude can't access a repository after you enter a valid URL, you're most likely connecting to a private repository. The fix it gives is to grant the Claude GitHub App access, or ask your organization's admins to.

  1. On GitHub, open github.com/settings/applications and find the Claude entry.
  2. Check which organizations and repositories it can reach.
  3. If the repo belongs to an organization and the button reads "Request" instead of "Grant", you can't authorize it yourself. An org admin has to approve it.

That page describes the integration in general, not this exact error, so a correct setup here may not clear it.

3. Authorize SSO if your organization uses it

If a GitHub organization requires single sign-on, each user must separately authorize the Claude app for that organization. Until you do, GitHub filters that organization's private repositories from your view.

4. Rule out an outage

Open status.claude.com and look at the Claude Code component. Anthropic's own error-message page says that for confirmed incidents, status.claude.com has real-time updates on scope, impact and resolution. As of late November 2026 the status page also lists past incidents that named Claude Code on the Web among affected features. If one is open, wait for it to resolve. If the page is clear and only your private repo fails, you probably match the reported pattern.

5. Test a public repo

Start a web session on a public repo. If it works and your private repo fails, you match the reports, and you can say so when you report it. If both fail, it's likely a different problem or an incident, so include both results.

6. Run Claude Code locally on the same repo

This skips the web session entirely. In Terminal:

bash
cd path/to/your/repo
claude

This starts Claude Code in that folder, using the git access already on your Mac. If the repo isn't on your Mac yet and you have the GitHub CLI, clone it first:

bash
gh repo clone owner/repo

If Claude Code isn't installed, see how to install Claude Code on a Mac.

What you give up: the hosted environment. Your Mac does the work, so closing the terminal ends the session unless you set something up to keep it running. See keeping Claude Code running after you close the terminal.

If you do want agents that survive quitting the app, Sledbot's Connect GitHub step signs in through the official gh CLI and clones private repos as projects. Agents run in a background engine, so quitting Sledbot doesn't stop them. Setup is in Getting started with Sledbot and GitHub in Sledbot. It's sold only as part of MacSuite ($349 one-time, as of November 2026), with a 7-day free trial.

Checklist before you report it

  • [ ] You retried once and started a new session.
  • [ ] status.claude.com showed no open incident for Claude Code.
  • [ ] The Claude GitHub App has access to the repo, and SSO is authorized if the org requires it.
  • [ ] You tried a public repo and noted whether it worked.
  • [ ] You confirmed the CLI works on the same repo.

If nothing works

Add your details to the existing GitHub issues (#18452 and #17888) on the Claude Code repository, or contact Anthropic support through the Claude help center. Check the threads first for a newer reply, since both were last seen in January 2026. Include:

  • The exact error text.
  • That it appears right after "Fetching repository...".
  • Whether the repo is private, whether it's in an organization, and whether SSO is required.
  • Whether a public repo works.
  • That the CLI works for the same repo.
  • The date and time (with time zone) of the failure, and your plan if you're comfortable sharing it.
text
Subject: Claude Code on the web fails after "Fetching repository..."

Starting a Claude Code web session on a private repo fails right after
"Fetching repository..." with: "An error occurred while executing Claude
Code. You can try again by sending a new message or starting a new session."

Repo: private, owner/repo (organization: yes/no, SSO required: yes/no)
Public repo test: works / also fails
Claude Code CLI on the same repo: works
Claude GitHub App access checked: yes
status.claude.com: no open incident at the time
Time of failure: YYYY-MM-DD HH:MM (time zone)
Retried and started a new session: yes, same result

Common questions

Is my code or repo broken?

Probably not. The reports say the CLI and the VS Code extension work on the same repo, which points at the web session's setup step, not the repository contents.

Will reconnecting GitHub in Claude settings fix it?

It might help if the app lost access. Anthropic's help page says that for the SSO case, a fresh connection doesn't automatically authorize organizations that require SSO. Check the Claude entry in your GitHub application settings.

Does the CLI give me the same result as the web session?

The work is the same kind, but it runs on your Mac instead of an isolated cloud VM, so your local tools and files are in play. Anthropic's docs describe cloud sessions as useful for repositories you haven't cloned locally. If the repo is already on your machine, running it locally loses little.

Is the error always about private repos?

Not necessarily. The two reports we found involve private repos, but the message itself is generic, and incidents can produce errors too. That's why the public-repo test and the status page are worth a minute.

Every app.
One purchase.