Preflight Checklist
What's Wrong?
Workspace trust dialogs appear every time Claude Code is launched in a git worktree subdirectory, even when the worktree path has been pre-configured in ~/.claude/.claude.json with allowedTools: []. This blocks automated multi-agent orchestration workflows where Claude instances are spawned
programmatically in isolated worktrees.
The ~/.claude/.claude.json configuration correctly contains the worktree path:
{
"projects": {
"/workspace/worktrees/initialize-blazor-server-project-task-qnh0ys8fs": {
"allowedTools": []
}
}
}
However, when spawning Claude in this exact path, the "Do you trust the files in this folder?" dialog still appears, requiring manual approval despite the pre-configuration.
What Should Happen?
When a workspace path is pre-configured in ~/.claude/.claude.json under the projects object with allowedTools: [], Claude Code should recognize this as a trusted workspace and skip the workspace trust dialog on launch.
This would enable:
- Automated spawning of Claude instances in worktrees without manual intervention
- Multi-agent orchestration systems where multiple Claude instances work in parallel
- CI/CD integration where Claude processes run in subdirectories
Error Messages/Logs
Steps to Reproduce
- Create a git worktree subdirectory:
git worktree add /workspace/worktrees/test-task-123 -b test-branch
- Pre-configure workspace trust in ~/.claude/.claude.json:
cat > ~/.claude/.claude.json << 'EOF'
{
"projects": {
"/workspace/worktrees/test-task-123": {
"allowedTools": []
}
}
}
EOF
- Launch Claude Code in the worktree with permission bypass flags:
cd /workspace/worktrees/test-task-123
claude --dangerously-skip-permissions --permission-mode bypassPermissions
- Expected: Claude launches without prompts
Actual: "Do you trust the files in this folder?" dialog appears
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
2.0.8
Claude Code Version
2.0.10
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
VS Code integrated terminal
Additional Information
Environment:
- Claude Code Version: 2.0.9+
- Platform: Linux (WSL2 in Docker devcontainer)
- Terminal: tmux
- Parent directory: Git repository with worktrees
- Worktree structure: /workspace/worktrees/{task-id}/
Workaround:
Manually clicking "Yes, proceed" on first launch per worktree, but this defeats automated workflows.
Feature Request:
Add a command-line flag like --trusted-workspace or --skip-trust-dialog for automation use cases where the workspace is known to be safe.
Preflight Checklist
What's Wrong?
Workspace trust dialogs appear every time Claude Code is launched in a git worktree subdirectory, even when the worktree path has been pre-configured in ~/.claude/.claude.json with allowedTools: []. This blocks automated multi-agent orchestration workflows where Claude instances are spawned
programmatically in isolated worktrees.
The ~/.claude/.claude.json configuration correctly contains the worktree path:
{
"projects": {
"/workspace/worktrees/initialize-blazor-server-project-task-qnh0ys8fs": {
"allowedTools": []
}
}
}
However, when spawning Claude in this exact path, the "Do you trust the files in this folder?" dialog still appears, requiring manual approval despite the pre-configuration.
What Should Happen?
When a workspace path is pre-configured in ~/.claude/.claude.json under the projects object with allowedTools: [], Claude Code should recognize this as a trusted workspace and skip the workspace trust dialog on launch.
This would enable:
Error Messages/Logs
Steps to Reproduce
git worktree add /workspace/worktrees/test-task-123 -b test-branch
cat > ~/.claude/.claude.json << 'EOF'
{
"projects": {
"/workspace/worktrees/test-task-123": {
"allowedTools": []
}
}
}
EOF
cd /workspace/worktrees/test-task-123
claude --dangerously-skip-permissions --permission-mode bypassPermissions
Actual: "Do you trust the files in this folder?" dialog appears
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
2.0.8
Claude Code Version
2.0.10
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
VS Code integrated terminal
Additional Information
Environment:
Workaround:
Manually clicking "Yes, proceed" on first launch per worktree, but this defeats automated workflows.
Feature Request:
Add a command-line flag like --trusted-workspace or --skip-trust-dialog for automation use cases where the workspace is known to be safe.