Repository navigation
Closed
Copy link
Description
Agent Diagnostic
- Skills loaded:
create-spike - OpenShell version tested:
0.0.85-dev.5+g3dee5570 - Latest release checked:
v0.0.83 - Known fixes reviewed: sandbox upload dereferences symlinks — uploaded as real directories, breaking git #1425 and merged PR fix(cli): preserve symlinks during sandbox upload #1595
- Possible duplicates reviewed: searched open issues for
sandbox upload symlink; no open duplicate found.sandbox uploadcreates a directory instead of a file when source is inside a git repository #1740 concerns
regular-file destination semantics and is unrelated. - Findings: PR fix(cli): preserve symlinks during sandbox upload #1595 fixed symlink preservation in uploads. A later refactor in feat(providers): add Google Vertex AI inference provider #1568 restored
Path::exists()and the Git-
aware upload path for standalonesandbox upload. That path canonicalizes the source and dereferences symlinks. Dangling
symlinks are rejected by the existence check. - Remaining reason for filing: current main reproduces the regression, while the documentation promises that regular and
dangling symlinks are preserved.
Description
Standalone openshell sandbox upload no longer preserves a symlink when the source path itself is a symlink.
Actual behavior: A symlink to a directory is uploaded as a real directory containing the target’s contents. A dangling
symlink is rejected as a missing local path.
Expected behavior: The sandbox should receive a symlink with the same target path. Dangling symlinks should also be
preserved, matching the documented behavior and the fix from #1595.
sandbox create --upload is not affected because it already uses the symlink-aware upload planner.
Reproduction Steps
- Build the current CLI and create a sandbox:
OS="$(pwd)/target/release/openshell"
NAME="symlink-repro-$(date +%s)"
"$OS" sandbox create --name "$NAME" -- true- Create a Git repository containing a directory symlink and a dangling symlink:
tmp="$(mktemp -d)"
git -C "$tmp" init -q
mkdir "$tmp/real-dir"
echo hello > "$tmp/real-dir/file.txt"
ln -s real-dir "$tmp/link-dir"
git -C "$tmp" add real-dir link-dir
ln -s missing "$tmp/dangling"- Upload the directory symlink:
"$OS" sandbox upload "$NAME" "$tmp/link-dir" /sandbox/link-dir- Inspect the uploaded path:
"$OS" sandbox exec -n "$NAME" --no-tty -- test -L /sandbox/link-dir
echo "test -L exit=$?"
"$OS" sandbox exec -n "$NAME" --no-tty -- sh -c \
'if [ -L /sandbox/link-dir ]; then echo SYMLINK; readlink /sandbox/link-dir; elif [ -d /sandbox/link-dir ]; then echo
REAL_DIR; else echo OTHER; fi'- Try the dangling symlink:
"$OS" sandbox upload "$NAME" "$tmp/dangling" /sandbox/danglingEnvironment
- OS: macOS 26.5.2, arm64
- Docker: 29.3.1
- OpenShell:
0.0.85-dev.5+g3dee5570 - Latest release checked:
v0.0.83 - Possible duplicates checked: yes; no open duplicate found
Logs
Uploading .../link-dir -> sandbox:/sandbox/link-dir
✓ Upload complete
test -L exit=1
REAL_DIR
For a dangling symlink:
Error: local path does not exist: .../danglingAgent-First Checklist
- I pointed my agent at the repo and had it investigate this issue
- I loaded relevant skills (e.g.,
debug-openshell-cluster,debug-inference,openshell-cli) - I checked the latest OpenShell release and either reproduced the issue there or explained why I cannot upgrade/test it
- I searched existing issues for possible duplicates or explained why I could not
- My agent could not resolve this — the diagnostic above explains why
Metadata
Metadata
Assignees
Labels
No labels
Activity
loveRhythm1990 commentedon Jul 16, 2026
I’d like to work on this. I have a local reproduction and will submit a focused fix with regression tests.