Claude Code
Copy pagePermissions
Section titled “Permissions”By default, Claude Code prompts for permission before running commands. There are several ways to handle this in worktrees:
Share permissions across worktrees
Section titled “Share permissions across worktrees”To keep permission prompts but share granted permissions across worktrees:
files: symlink: - .claude/settings.local.jsonWorkrex uses .workrex.yaml, ~/.config/workrex/config.yaml, and WORKREX_* environment variables. See Configuration.
Add this to your global config (~/.config/workrex/config.yaml) or project’s .workrex.yaml. Since this file contains user-specific permissions, also add it to .gitignore:
.claude/settings.local.jsonSkip permission prompts (yolo mode)
Section titled “Skip permission prompts (yolo mode)”To skip prompts entirely, define a named agent with the flag:
agents: claude: "claude --dangerously-skip-permissions"This shadows the built-in claude name so all worktrees that workrex creates use the flag automatically, without affecting claude outside of workrex.
You can also use a separate name and reference it per-project:
agents: cc-yolo: "claude --dangerously-skip-permissions"
# .workrex.yaml (in projects that need it)agent: cc-yoloContinuing a conversation in a worktree
Section titled “Continuing a conversation in a worktree”Sometimes you want to continue a Claude conversation inside a worktree. Since worktrees are technically separate project directories, Claude Code treats them as different projects, so you cannot directly resume a conversation that started in another worktree (or the main tree).
claude-history solves this with its cross-project fork feature. Use --global mode to search conversations across all projects, then fork the one you want:
claude-history --globalSelect a conversation and press Ctrl+F to fork it. When the conversation belongs to a different project than your current directory, claude-history automatically copies the session files into the current project and resumes there. The forked conversation then lives in the worktree as if it started there.
Multiple Claude configurations (work/personal)
Section titled “Multiple Claude configurations (work/personal)”If you use separate Claude configurations for work and personal projects, define named agents in your global config:
agents: cc-work: "env CLAUDE_CONFIG_DIR=~/.claude-work claude" cc-personal: "env CLAUDE_CONFIG_DIR=~/.claude-personal claude"Then set the agent per project:
# work project .workrex.yamlagent: cc-workOr use it directly: workrex add feature -a cc-work.
Alternative: direnv
Section titled “Alternative: direnv”You can also use CLAUDE_CONFIG_DIR with direnv to switch configurations per directory. This affects claude everywhere, not just workrex:
export CLAUDE_CONFIG_DIR=~/.claude-work