[BUG] Bash task/monitor in Sandbox mode creates empty .dotfiles
Resolved 💬 3 comments Opened May 4, 2026 by parhamfh Closed May 8, 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?
For some reason Claude Code is generating empty dotfiles, I believe when executing Bash tasks and monitoring them, according to previous, _locked_ bug reports:
- https://github.com/anthropics/claude-code/issues/17087
- https://github.com/anthropics/claude-code/issues/17258
My claude conversation from a state of no dotfiles in the repo:
❯ monitor it
● Bash(docker logs -f 40a6a39708b4 2>&1)
⎿ Running in the background (↓ to manage)
● Monitor(<...>)
⎿ Monitor started · task bvxim3ba5 · persistent
● Monitor armed. Streaming via beb8xmnni.
And then I see at the bottom:
❯
────────────────────────────────────────────────────────────────────────────────────────────
1 shell, 1 monitor · ↓ to manage
And looking in the repo again
$ git status
On branch <>
Your branch is ahead of 'origin/<>' by 1 commit.
(use "git push" to publish your local commits)
<...>
Untracked files:
(use "git add <file>..." to include in what will be committed)
.bash_profile
.bashrc
.gitconfig
.idea
.mcp.json
.profile
.ripgreprc
.vscode
.zprofile
.zshrc
no changes added to commit (use "git add" and/or "git commit -a")
This happens consistently. I have not tried it outside of sandbox mode.
What Should Happen?
As Claude itself said:
The dotfiles in the working tree are untracked and unrelated.
🙂
Error Messages/Logs
Steps to Reproduce
- Get claude to run a bash task
- Observe dotfiles in your repository (
ls -aorgit status)
Claude Model
Opus
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.126 (Claude Code)
Platform
Anthropic API
Operating System
Ubuntu/Debian Linux
Terminal/Shell
iTerm2
Additional Information
This is over SSH.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗