[BUG] Claude Code branches disappear from GitHub after successful push
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 branches disappear from GitHub after successful push
Description
Branches created by Claude Code (web version) with the pattern claude/*-[session-id] disappear from GitHub after being successfully pushed, even though they remain present in the local git proxy.
Steps to Reproduce
- Claude Code creates a branch
claude/xxx-[session-id] - Commits are made and pushed successfully
- Push returns confirmation with GitHub PR creation URL
- After some time, the branch disappears from GitHub
- The branch still exists in the local proxy (
git branch -ashows it) - Running
git push -u origin <branch>again restores it on GitHub
Environment
Remote URL: http://local_proxy@127.0.0.1:29705/git/coissac/pmomusic Repository: https://github.com/coissac/pmomusic Branch pattern: claude/add-pmoplaylist-source-011CUpmZ9YbyUAUshEePVTJi Date: 2025-11-05
Successful Push Output
branch 'claude/add-pmoplaylist-source-011CUpmZ9YbyUAUshEePVTJi' set up to track 'origin/claude/add-pmoplaylist-source-011CUpmZ9YbyUAUshEePVTJi'. remote: remote: Create a pull request for 'claude/add-pmoplaylist-source-011CUpmZ9YbyUAUshEePVTJi' on GitHub by visiting:
remote: https://github.com/coissac/pmomusic/pull/new/claude/add-pmoplaylist-source-011CUpmZ9YbyUAUshEePVTJi
remote: To http://127.0.0.1:29705/git/coissac/pmomusic
[new branch] claude/add-pmoplaylist-source-011CUpmZ9YbyUAUshEePVTJi -> claude/add-pmoplaylist-source-011CUpmZ9YbyUAUshEePVTJi
Evidence from Git Commands
# Branch exists locally in proxy
$ git branch -a | grep claude
* claude/add-pmoplaylist-source-011CUpmZ9YbyUAUshEePVTJi
remotes/origin/claude/add-pmoplaylist-source-011CUpmZ9YbyUAUshEePVTJi
# Branch shows as up to date
$ git status
On branch claude/add-pmoplaylist-source-011CUpmZ9YbyUAUshEePVTJi
Your branch is up to date with 'origin/claude/add-pmoplaylist-source-011CUpmZ9YbyUAUshEePVTJi'.
Impact
Critical Issues:
Loss of visibility: Branches disappear from GitHub UI
Work appears lost: Users believe their work has been deleted
Context loss: New sessions cannot easily continue previous work
Broken workflow: Cannot create PR from a disappeared branch
Trust erosion: Users lose confidence in the persistence of their work
Frequency
Reported as occurring twice in the same day (2025-11-05) on the same repository.
Current Workaround
Re-push the branch from the Claude Code environment:
git push -u origin <branch-name>
This successfully restores the branch on GitHub, confirming the commits are preserved in the local proxy.
Expected Behavior
Branches pushed to GitHub should remain visible and accessible on GitHub until explicitly deleted or merged.
Actual Behavior
Branches pushed successfully to GitHub disappear after some time, despite the local proxy showing them as synchronized with the remote.
Questions for Investigation
Does the git proxy have a cleanup policy that deletes remote branches?
Is there a scheduled process that removes claude/* branches from GitHub?
Are there any GitHub API rate limits or authentication issues causing silent failures?
Could this be related to session expiration or token invalidation?
Severity
HIGH - This bug affects work continuity between sessions and can cause apparent data loss, severely impacting user trust and workflow reliability.
What Should Happen?
At least advertising or better clear from your cache if you want to save space, but not from my repository.
Error Messages/Logs
Steps to Reproduce
Just work and wait a few hours... your work disappears.
Claude Model
Sonnet (default)
Is this a regression?
I don't know
Last Working Version
??
Claude Code Version
Web online version
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
_No response_
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗