[BUG] Submodules cannot be initialized anymore since update from yesterday (Cloud/Remote)

Status Open
Maintainer reply None cached
Activity 5 comments · opened Jun 24, 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?

I am using Claude Code in the Cloud.
It is not possible anymore to checkout my Github project with two submodules which was working unitl yesterday.
The submodule is public and there are no restrictions. The submodule is also part of my organization.

Related to: https://github.com/anthropics/claude-code/issues/59570

What Should Happen?

-

Error Messages/Logs

-

Steps to Reproduce

-

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

Cloud

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

Other

Additional Information

_No response_

View original on GitHub ↗

5 Comments

missingbulb · 2 months ago

This is critical to many workflows. And happens on sync, too. And is not mitigated by network egress rules.

For sync - Claude runs the following:
$ git submodule sync && git submodule update --init --remote --recursive 2>&1

Exit code 128
Synchronizing submodule url for 'FOLDER_NAME/shared'
fatal: unable to access 'http://127.0.0.1:41729/git/USERNAME/SUBMODULE_REPO.git/': The requested URL returned error: 403
fatal: Unable to fetch in submodule path 'FOLDER_NAME/shared'

For init:
$ git submodule update --init FOLDER_NAME>&1

Exit code 1
Cloning into '/home/user/repo/FOLDER_NAME'...
fatal: unable to access 'http://127.0.0.1:41729/git/USERNAME/SUBMODULE_REPO.git/': The requested URL returned error: 403
fatal: clone of 'https://github.com/USERNAME/SUBMODULE_REPO.git' into submodule path '/home/user/WORKING_REPO/FOLDER_NAME' failed
Failed to clone 'FOLDER_NAME'. Retry scheduled
Cloning into '/home/user/repo/FOLDER_NAME'...
fatal: unable to access 'http://127.0.0.1:41729/git/USERNAME/SUBMODULE_REPO.git/': The requested URL returned error: 403
fatal: clone of 'https://github.com/USERNAME/SUBMODULE_REPO.git' into submodule path '/home/user/WORKING_REPO/FOLDER_NAME' failed
Failed to clone 'FOLDER_NAME' a second time, aborting

gex581990 · 1 month ago

Yes this has seriously messed up my workflow. Claude Code agents are in the dark now with a lot of my projects cause they can't even initialize and hit a wall....utterly stupid.

wertania · 1 month ago

My workaround is that I now pre-build all submodules on GitHub Actions to a zip release bundle (on the main working repo) that Claude can download it... It works, but it's really not a good solution.

gex581990 · 1 month ago

I figured out a workaround. Add this to your Claude Code cloud default environment

#!/usr/bin/env bash
echo "=== PWD ==="; pwd
echo "=== HOME=$HOME ==="
echo "=== listing cwd ==="; ls -la .
echo "=== candidate roots ==="
for d in "$HOME" /workspace /workspaces /root /home /app /src /repo; do
  [ -d "$d" ] && { echo "-- $d --"; ls -la "$d" 2>/dev/null | head -20; }
done
echo "=== searching for .git (maxdepth 4) ==="
find "$HOME" /workspace /workspaces /root /home 2>/dev/null -maxdepth 4 -name .git | head -20
echo "=== extraheader check (if any repo found, run inside it manually later) ==="
git config --list 2>/dev/null | grep -i extraheader || echo "(no extraheader in cwd / not a repo here)"

Then commit this to your repo. the path would be ".claude/settings.json". That file should contain this:

{
  "hooks": {
    "SessionStart": [
      {
        "hooks": [
          {
            "type": "command",
            "command": "git rev-parse --is-inside-work-tree >/dev/null 2>&1 && git submodule update --init --recursive",
            "timeout": 300,
            "statusMessage": "Initializing git submodules..."
          }
        ]
      }
    ]
  }
}

It worked for me. My already existing Claude Code sessions needed to be told to do "git submodule sync" and "git submodule update --init --recursive" but then they got it. Tell them to pull in your settings.json commit might work but I'm not sure, haven't tried that yet. Any new session tho automatically inits submodules and sees them right away.

wertania · 1 month ago

Seems to be fixed