Bug
claude-code-action v1.0.74+ (PR #1066) introduced the restoreConfigFromBase feature that restores .claude/, .mcp.json, .claude.json, .gitmodules, and .ripgreprc from the PR base branch before running the CLI.
In repositories that contain .gitmodules (with git submodules), this restore step hangs indefinitely with no output and no error.
Environment
- Runner: self-hosted macOS ARM64
- Repository has
.gitmodules with submodules
- PR base branch:
release/5.1.0 (non-main)
- claude-code-action:
@v1 (resolved to SHA df37d2f0, v1.0.75)
- Claude Code: 2.1.79
- Agent SDK: 0.2.79
Steps to Reproduce
- Have a repository with
.gitmodules (git submodules configured)
- Create a PR targeting a non-main branch (e.g.,
release/5.1.0)
- Trigger
claude-code-action@v1 (v1.0.74+)
- Observe the
restoreConfigFromBase step
Expected Behavior
The restore step completes (or fails with an error) within a reasonable time.
Actual Behavior
The step hangs indefinitely after printing:
Restoring .claude, .mcp.json, .claude.json, .gitmodules, .ripgreprc from origin/release/5.1.0 (PR head is untrusted)
No further output is produced. The job ran for ~4 hours until manually cancelled.
Logs
Last output before hang:
2026-03-19T09:13:13.0854080Z Claude Code installed successfully
2026-03-19T09:13:13.0864890Z Restoring .claude, .mcp.json, .claude.json, .gitmodules, .ripgreprc from origin/release/5.1.0 (PR head is untrusted)
2026-03-19T13:11:45.8391970Z ##[error]The operation was canceled.
Previous run with v1.0.73 (SHA cd77b50d, before PR #1066) completed successfully in ~20 minutes. No "Restoring" step was present.
Difference from #1080
Issue #1080 reports that restoreConfigFromBase fails with fatal: couldn't find remote ref main when the default branch is not main. This issue is different:
The hang may be caused by the git operations involved in restoring .gitmodules triggering submodule-related git commands (e.g., git submodule update) that block waiting for network/authentication input.
Workaround
Pin to a commit before PR #1066:
uses: anthropics/claude-code-action@cd77b50d2b0808657f8e6774085c8bf54484351c # v1.0.73
Question
What is the recommended way to determine when it is safe to unpin? Specifically:
- Is there a test or release note we can watch for that confirms the
.gitmodules hang is fixed?
- Would adding a timeout to the restore step itself (independent of the job-level
timeout-minutes) be a reasonable safeguard?
Related
Bug
claude-code-actionv1.0.74+ (PR #1066) introduced therestoreConfigFromBasefeature that restores.claude/,.mcp.json,.claude.json,.gitmodules, and.ripgreprcfrom the PR base branch before running the CLI.In repositories that contain
.gitmodules(with git submodules), this restore step hangs indefinitely with no output and no error.Environment
.gitmoduleswith submodulesrelease/5.1.0(non-main)@v1(resolved to SHAdf37d2f0, v1.0.75)Steps to Reproduce
.gitmodules(git submodules configured)release/5.1.0)claude-code-action@v1(v1.0.74+)restoreConfigFromBasestepExpected Behavior
The restore step completes (or fails with an error) within a reasonable time.
Actual Behavior
The step hangs indefinitely after printing:
No further output is produced. The job ran for ~4 hours until manually cancelled.
Logs
Last output before hang:
Previous run with v1.0.73 (SHA
cd77b50d, before PR #1066) completed successfully in ~20 minutes. No "Restoring" step was present.Difference from #1080
Issue #1080 reports that
restoreConfigFromBasefails withfatal: couldn't find remote ref mainwhen the default branch is notmain. This issue is different:"main"fallbackThe hang may be caused by the git operations involved in restoring
.gitmodulestriggering submodule-related git commands (e.g.,git submodule update) that block waiting for network/authentication input.Workaround
Pin to a commit before PR #1066:
Question
What is the recommended way to determine when it is safe to unpin? Specifically:
.gitmoduleshang is fixed?timeout-minutes) be a reasonable safeguard?Related
restoreConfigFromBaserestoreConfigFromBasefails on repos with non-"main" default branchrestoreConfigFromBasefails onissue_commenteventsrepository.default_branchinstead of hardcoded"main")