Skip to content

gh issue develop reports an error with slash in branch name #13805

Closed

Description

@S-zhi

Describe the bug

When I use gh issue develop to create and link an issue development branch, or to link an existing branch, the command fails when the branch name contains a forward slash /.

gh issue develop <issue-id> --repo <repo> --name feat/xxx
failed to create linked branch: API returned empty branch name

However, when the branch name does not contain a forward slash /, the command succeeds.

Affected version

Please run gh version and paste the output below.

gh version 2.96.0 (2026-07-02)
https://github.com/cli/cli/releases/tag/v2.96.0

macOS

Steps to reproduce the behavior

  1. Prepare a GitHub repository and create an issue.
  2. Create a branch whose name contains a forward slash.
  3. Run gh issue develop <issue-id> --repo <repo> --name feat/xxx with the correct values.
  4. See the error.

Expected vs actual behavior

Expected: the issue should successfully link to a branch whose name contains a forward slash.

Logs

GH_DEBUG=true gh issue develop 7 --repo S-zhi/Subtitles-AI --name ai-feat/restrict-cors-7

Fetching issue #7 ⣾* Request at 2026-07-07 01:53:01.812899 +0800 +08 m=+0.145975585
* Request to https://api.github.com/graphql
Fetching issue #7 ⣷* Request took 879.852916ms
* Request at 2026-07-07 01:53:02.725362 +0800 +08 m=+1.058450960
* Request to https://api.github.com/graphql
Checking linked branch support ⡿* Request took 565.013916ms
Checking existing linked branches ⣾* Request at 2026-07-07 01:53:03.325929 +0800 +08 m=+1.659025918
* Request to https://api.github.com/graphql
Checking existing linked branches ⡿* Request took 486.727ms
* Request at 2026-07-07 01:53:03.851086 +0800 +08 m=+2.184189210
* Request to https://api.github.com/graphql
Resolving base branch ⣾* Request took 458.676916ms
* Request at 2026-07-07 01:53:04.344852 +0800 +08 m=+2.677961835
* Request to https://api.github.com/graphql
Creating linked branch ⣷* Request took 872.470375ms
failed to create linked branch: API returned empty branch name

Additional context

Hello, this is my first time submitting an issue. If there is any problem with this bug report, please let me know.

I think this may be similar to #10857.
Thank you for taking the time to read this issue.

Activity

  1. added
    needs-triage
    on Jul 6, 2026
  2. babakks commented on Jul 21, 2026

    @babakks
    Member

    Thanks for reporting this, @S-zhi! 🙏

    I'm not able to reproduce this. To help us dig further, could you help with two things?

    1. Does your repo already have a branch named exactly ai-feat or feat (just that part before the slash, not something like ai-feat-something)?

    2. Could you re-run the command with API debugging enabled and share the output? Please redact anything sensitive:

      GH_DEBUG=api gh issue develop <issue-id> --repo <repo> --name ai-feat/restrict-cors-7

    The debug output will show exactly what the API returns in your case, which will help us pin down what's happening.

  3. added
    more-info-needed
    gh-issue
    on Jul 21, 2026
  4. github-actions commented on Jul 21, 2026

    @github-actions
    Contributor

    Thank you for your issue! Unfortunately, we are unable to reproduce the issue you are experiencing. Please provide more information so we can help you.

    Here are some tips for writing reproduction steps:

    • Step by step instructions accompanied by screenshots or screencasts are the best.

    • Be as specific as possible; include as much detail as you can.

    • If not already provided, include:

      • the version of the application you are using.
      • the operating system you are using
      • any environment factors you can think of.
      • any custom configuration you are using.
    • If relevant and can be shared, provide the repository or code you are using.

  5. github-actions commented on Aug 4, 2026

    @github-actions
    Contributor

    Thank you for your issue!
    We haven't gotten a response to our questions above. With only the information that is currently in the issue, we don't have enough information to take action. We're going to close this but don't hesitate to reach out if you have or find the answers we need. If you answer our questions above, this issue will automatically reopen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    gh-issuemore-info-neededneeds-triageunable-to-reproduce

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions