[BUG] bwrap fails in a worktree when .claude/skills is a symlink in a repository
Open 💬 5 comments Opened Apr 7, 2026 by ElectronicRU
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?
Hello,
Our repository at my job has the following setup:.ai-agents/skills.claude/skills --> ../.ai-agents/skills
This causes Claude to fail with sandbox: true, bwrap installed and launching with --worktree. See error message below.
What Should Happen?
sandbox: true is expected to work with worktrees regardless of repository structure.
Error Messages/Logs
● Bash(pwd && ls .claude/)
⎿ Error: Exit code 1
bwrap: Can't create file at /home/claude-aiven-3/git/aiven-core/.claude/skills: Is a
directory
Steps to Reproduce
- Create a new git repository
mkdir -p .ai-agents/skillsmkdir .claude- Symlink
.claude/skillsto point to.ai-agents/skills - Launch Claude Code from this workspace with
claude --worktree testwith sandbox enabled in settings.json - Have the Claude instance execute a bash command
Claude Model
Opus
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.92 (Claude Code)
Platform
AWS Bedrock
Operating System
Other Linux
Terminal/Shell
Other
Additional Information
The problem goes away with copy-pasted directories. I would guess that bwrap has a problem when copying over the .claude directory because it doesn't check the subdirectories existing with lstat, although I could be wrong.
This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗