Reference
Troubleshooting
Find what you're seeing, then say the fix to the agent. Most problems take one prompt. Click things yourself only where a step says so.
Try this first
For any error, copy the whole message, not a summary of it, and paste it back:
Here's the error: paste the exact error. Explain what went wrong in plain English and fix it.
Setup
It says git, node or gh is "not recognized" or "not found", but I just installed it
Close every VS Code window and open VS Code again. It only finds new tools when it starts. On Windows, restart the computer if that doesn't help. Then say:
Show me the versions of git, node and gh, and confirm gh is logged in.
It says "running scripts is disabled on this system"
Allow PowerShell scripts for my user account only using Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser -Force, then check it with Get-ExecutionPolicy -List.
Windows only. Windows: allow scripts explains it and shows how to run it yourself.
VS Code says Restricted Mode, or the agent doesn't work in my folder
Do this yourself, because agents are turned off until you trust the folder. Click Manage in the Restricted Mode banner, then Trust. Or open the Command Palette (Ctrl + Shift + P, or Cmd + Shift + P on Mac), run Workspaces: Manage Workspace Trust and trust the folder. Trust only folders you made or cloned from someone you trust. See Trusted folders.
Sign-in fails, or says my plan doesn't include it
Claude Code needs Claude Pro, Max, Team or Enterprise. The free Claude plan doesn't include it. Codex in VS Code needs ChatGPT Plus or higher. Check your plan, then sign in again.
GitHub and pushing
The push was rejected
Pull first, then push again. Don't force-push.
Someone, maybe you on another device, pushed first. A force-push would overwrite their changes on GitHub.
It says there's a merge conflict
Two changes touched the same lines. Let the agent explain it before anything is overwritten:
Explain the conflict in plain English and suggest which version to keep. Don't change anything until I choose.
Git asks for my password or a token when it pushes
Git is asking me for a password to push. Check whether the GitHub CLI is logged in and set up to sign Git in to GitHub, and tell me exactly what I need to do.
Don't type your GitHub password there. GitHub no longer accepts passwords for Git, and you don't need a token. Run gh auth login yourself and say yes when it offers to use your GitHub login for Git, as shown in Git, Node & GitHub CLI. On Windows, Git for Windows can also sign you in through your browser.
My commits say "Claude" instead of my name
In your-username/your-repo, set git user.name to "Your Name" and user.email to "your-noreply-email", and commit as me from now on. Add this rule to a CLAUDE.md file at the root of that repo (create it if needed) so every session follows it: Commit as Your Name <your-noreply-email>. Before your first commit in each session, set git user.name and user.email to these in this repo. Then commit and push to main.
Older commits keep their author. See Commit as yourself.
My commits don't show on my GitHub profile
Show me the author name, email and branch of my last 5 commits.
A commit counts only if its email is your noreply address or another email on your account, the repo isn't a fork, and the commit is on main. Then allow up to 24 hours. Commits in a fork don't count unless they're merged into the original repo, so make a fresh copy instead: Clone, fork or copy.
I committed a password, key or token
First, on the site that issued it, change the password, or cancel the key and make a new one. Deleting the file isn't enough, because the history keeps it. Then:
Remove the file with the secret from the repo and add it to .gitignore so it can't be committed again. Then commit and push to main.
GitHub's guide Removing sensitive data from a repository (opens in a new tab) covers clearing it from the history.
The agent
The agent changed the wrong repo
Undo your changes in the other repo. Work only in your-username/your-repo. Treat the other repos as read-only reference.
A repo that isn't yours stays safe on GitHub, because the agent can't push to it. Start every session that has more than one repo with that last sentence. See Many repos, one to work in.
The agent made up a fact or a number
Check every fact, date and number on the site against research/notes.md. Remove anything that has no working source link, or mark it TBD. List what you changed.
Then add the "never invent facts" rule to your CLAUDE.md, as in the Prompt cheat sheet.
The agent is going in circles
Stop it. Start a new session (in VS Code, a new conversation), so the confusion doesn't carry over. Give it one clear goal and the exact error:
Here's what I want: what done looks like. Here's the exact error: paste the exact error. Tell me what you think is wrong and your plan. Don't change anything until I say go.
Still stuck? Ask for choices: "Give me two or three ways to fix this, with the pros and cons of each in plain English. Don't change anything until I choose."
The app
My repo isn't in the repository selector
Do this yourself on GitHub, because it's a permission on your account. Claude needs the Claude GitHub App on your repo, public or private. If you chose Only select repositories, each new repo or fork needs adding. Click your profile picture, then Settings → Applications → Installed GitHub Apps. Click Configure next to Claude, select the repo and click Save. Then start a new session and pick the repo.
Claude isn't listed there? Install it: open https://github.com/apps/claude/installations/new (opens in a new tab), choose your account, pick All repositories (or Only select repositories and your repo) and click Install.
Claude says it can't create or fork a repo
Do this yourself on GitHub, because a session can reach only the repos you picked. New repo: go to https://github.com/new (opens in a new tab), type your-repo, choose Public, turn on the option to add a README and click Create repository. Fork: open the starter, click Fork, type your-repo as the repository name and click Create fork. Then start a new session and pick the new repo in the repository selector. See Clone, fork or copy.
Claude says it can't push
Work only in your-username/your-repo. Treat the other repos as read-only reference.
Claude can't push to a repo that isn't yours, such as the starter. If it's already in your repo, add the repo to the Claude GitHub App, or install the app (above), and ask again.
Claude can't push to main
Push your branch, then open a pull request from it into main of your-username/your-repo (my repo, not the original) and merge it.
See The main branch.
Claude can't open websites for research
The cloud machine may block most websites. Paste your research prompt into a regular Claude chat with web search on, then bring the answer back to your session:
Put these research results in research/notes.md exactly as written, then commit and push to main: paste the results
Or let your sessions reach any website: at https://claude.ai/code (opens in a new tab), click the cloud icon with your environment's name, in the row above the message box. Point to your environment in the list and click the settings icon that appears beside it. Set Network access to Full, save, and start a new session.
GitHub Pages
My change isn't on the live site
Is my last commit pushed to main on GitHub? If not, push it to main.
On the app path, the work may still be on Claude's claude/… branch. Say "Which branch is my work on? Get it onto main and push main." Then wait for the green check in your repo's Actions tab, up to 10 minutes, and open the address in a private or incognito window, which skips the copy your browser saved.
I get a 404 page
My site at https://your-username.github.io/your-repo/ shows a 404. Check that index.html, in lowercase, is in the folder GitHub Pages publishes from on main, tell me which branch and folder Pages should use, and fix anything in the repo.
Then check Settings → Pages yourself: branch main, and the folder that holds index.html, / (root) or /docs. Type the address in lowercase, and give it the full 10 minutes.
I can't turn on Pages for my repo
On a free GitHub account, Pages works only from public repos. Visibility is a repo setting, so change it yourself: open the repo's Settings, scroll to the Danger Zone section, click Change visibility and make it public. Then switch Pages on as in Turn on GitHub Pages.
On the VS Code path, the agent can make it public with the GitHub CLI:
Make your-username/your-repo public.
My fork doesn't publish, or its workflows don't run
Forked startup-india-guide? First delete its .github/workflows folder yourself on GitHub, as shown in Make your own version. It runs a daily news bot you don't want. Then open the fork's Actions tab. If a banner there asks you to enable workflows, enable them yourself. GitHub doesn't run workflows in a fork until you do. Then:
Update PROGRESS.md, then commit and push to main.
The site looks wrong
No styling, or broken images
Some styles or images don't load on my live site. Find links to this repo's own CSS, JavaScript and image files that start with / or point to the original owner's site, and make them relative. Leave links to other services alone, such as map, chart and font libraries and hot-linked photos, and keep the share-image (og:image) address a full https:// link. Check that each file name matches its link exactly, including capital letters. Then commit and push to main.
Web addresses are case-sensitive, so a link to Photo.jpg won't find photo.jpg online, even if it worked on your computer.
The site looks broken after a change
The page now describe what looks wrong. Compare my repo with the starter I copied, fritzhand/history-of-tampa, find what broke and fix it.
Or go back one step: "Revert the last commit and push to main."
Saved only in this browser.