[BUG] Claude Code Web creates PR URL with hardcoded 'main' instead of default branch
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
Claude Code Web correctly works with code from the default branch (dev),
but when creating a PR, it generates URL with hardcoded 'main':
compare/main...claude/branch-name
Should be:
compare/dev...claude/branch-name
Repository default branch is set to 'dev'.
What Should Happen?
PR URL should use the repository's default branch instead of hardcoded 'main'.
If default branch is 'dev', URL should be:
compare/dev...claude/branch-name
Error Messages/Logs
Steps to Reproduce
- Have a GitHub repository with default branch set to 'dev' (not 'main')
- Open Claude Desktop App for Windows
- Start a new remote/cloud session with this repository
- Make any code changes
- Let Claude create a PR (or click "Create PR" button)
- Observe the generated PR URL: compare/main...claude/branch-name
- Expected: compare/dev...claude/branch-name (should use default branch)
Claude Model
Opus
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
Claude Desktop App for Windows (latest version, cannot run --version in GUI app)
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
Other
Additional Information
Platform: Claude Desktop App for Windows (not CLI, not web)
Using cloud/remote sessions feature within the desktop app.
Screenshot attached showing repository default branch is set to 'dev'.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗