[BUG] Claude-create worktree branch names "+" character breaks Claude Code github review

Resolved 💬 2 comments Opened Apr 13, 2026 by mistakenot Closed May 25, 2026

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 is creating branch names for worktrees that are breaking the official Claude Code github app review path.

To recreate:

  1. Ask claude to create a worktree to do some work on. Claude uses the EnterWorktree to create the worktree and automatically assigns a name to it.
  2. The created worktree path looks something like ~/.claude/worktrees/task+347-discovery-from-enriched-accounts.
  3. When complete, Claude opens a PR with a branch name something like worktree-task+347-discovery-from-enriched-accounts.
  4. Push up the PR to github, and using the Claude connected github app, expect it to do a code review.
  5. Claude Code app fails at code review with following errors:
Error: Action failed with error: Invalid branch name: "worktree-task+347-discovery-from-enriched-accounts". Branch names must start with an alphanumeric character and contain only alphanumeric characters, forward slashes, hyphens, underscores, periods, or hashes (#).
Internal error: directory mismatch for directory "/home/runner/work/_actions/anthropics/claude-code-action/v1/tsconfig.json", fd 4. You don't need to do anything, but this indicates a bug.
Error: Process completed with exit code 1.

What Should Happen?

Claude should either:

  • Not put characters like + in the branch names (alpha numeric lower case and dash only), or
  • Claude Code review github action should accept + in the branch name.

Error Messages/Logs

From the Github Actions log:

STEP 1 — Read existing review history (do this FIRST):
- `gh api repos/[redacted]pulls/32/comments` for inline review comments
- `gh api repos/[redacted]/issues/32/comments` for general PR comments
- `gh pr view 32 --json reviews` for review submissions

STEP 2 — Review the current diff:
- `gh pr diff 32`
- Read source files for context when needed

STEP 3 — Post findings, following these rules:
- Do NOT repeat issues already raised by any reviewer (human or bot)
- Do NOT flag issues that were raised then addressed in subsequent commits
- Focus ONLY on new or still-unresolved issues
- Only flag issues critical enough to block merge (bugs, security, correctness)
- Skip style nitpicks unless they violate CLAUDE.md conventions
- Be concise — state the problem, why it matters, and a suggested fix
- If no new significant issues, just say "LGTM"

OUTPUT:
- Use `mcp__github_inline_comment__create_inline_comment` for specific code issues
- Write your summary into the tracking comment

Trigger result: true
Preparing with mode: tag for event: pull_request
Actor type: User
Verified human actor: [redacted]
✅ Created initial comment with ID: [redacted]
Successfully fetched PR #32 data
Found 1 image(s) in issue_comment [redacted]
Downloading https://github.com/user-attachments/assets/[redacted]...
✓ Saved: /tmp/github-images/image-[redacted]-0.png
This is an open PR, checking out PR branch...
PR #32: 9 commits, using fetch depth 20
Error: Action failed with error: Invalid branch name: "worktree-task+347-discovery-from-enriched-accounts". Branch names must start with an alphanumeric character and contain only alphanumeric characters, forward slashes, hyphens, underscores, periods, or hashes (#).
Internal error: directory mismatch for directory "/home/runner/work/_actions/anthropics/claude-code-action/v1/tsconfig.json", fd 4. You don't need to do anything, but this indicates a bug.
Error: Process completed with exit code 1.

Steps to Reproduce

To recreate:

  1. Ask claude to create a worktree to do some work on. Claude uses the EnterWorktree to create the worktree and automatically assigns a name to it.
  2. The created worktree path looks something like ~/.claude/worktrees/task+347-discovery-from-enriched-accounts.
  3. When complete, Claude opens a PR with a branch name something like worktree-task+347-discovery-from-enriched-accounts.
  4. Push up the PR to github, and using the Claude connected github app, expect it to do a code review.
  5. Claude Code app fails at code review with following errors:

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.104

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

_No response_

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗