fix(sandbox): upload .git directory separately into sandbox - #1071
Merged
Conversation
openshell sandbox upload applies .gitignore filtering by default via git ls-files, which categorically excludes .git/. Since the SCP-to- openshell migration (v0.8.0, May 15), every code agent run received the target repo as a bare file tree without git history. Upload .git/ as a separate step after the main repo upload. Because .git/ is not itself a git working tree, openshell's git ls-files falls back to an unfiltered tar upload — no --no-git-ignore flag needed. Fixes #1070 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
maruiz93
approved these changes
May 18, 2026
Site previewPreview: https://6547c514-site.fullsend-ai.workers.dev Commit: |
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
.git/as a separate step after the main repo upload to restore git history in the sandboxopenshell sandbox uploadstrips.git/viagit ls-filesfiltering, leaving agents with a bare file tree.git/directly bypasses the filter because it's not a working tree — openshell falls back to unfiltered tarContext
git init, lose history, post-script discards their workfortunate-pup)Test plan
go vet ./...passesgo test ./...passes (all packages).git/uploads successfully without--no-git-ignorevia live sandbox test.git/in sandbox and creates a feature branchFixes #1070
🤖 Generated with Claude Code