acceptEdits mode prompts for files in additionalWorkingDirectories when path is relative

Resolved 💬 3 comments Opened Mar 26, 2026 by MaicolBen Closed Mar 30, 2026

Description

When acceptEdits permission mode is enabled, edits to files inside additionalWorkingDirectories still trigger a permission prompt if Claude Code resolves the file path as a relative path (e.g., ../worktrees/...) instead of an absolute one.

Repro

  1. Set up a project with this project-settings.json:
{
  "additionalWorkingDirectories": ["~/projects/worktrees"],
  "sandbox": {
    "enabled": true
  }
}
  1. Primary working directory is ~/projects/code
  2. Enable acceptEdits permission mode
  3. Ask Claude to edit a file in ~/projects/worktrees/my-branch/my-repo/src/Foo.elm

Expected

Edit is auto-accepted - the file is inside additionalWorkingDirectories.

Actual

Claude shows the edit path as ../worktrees/my-branch/my-repo/src/Foo.elm (relative) and prompts:

Do you want to make this edit to Foo.elm?

Analysis

It appears the relative path ../worktrees/... is not being resolved to its absolute form before checking against additionalWorkingDirectories. The path should resolve to ~/projects/worktrees/... which matches the configured directory, but the matching fails because it's compared as a relative path.

Environment

  • macOS
  • Claude Code (latest)

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗