[BUG] /add-dir replaces additionalDirectories instead of appending

Resolved 💬 3 comments Opened Dec 16, 2025 by mousio Closed Dec 16, 2025

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?

When using multiple /add-dir commands in a session, only the last directory is persisted to settings.local.json. The command replaces the additionalDirectories array rather than appending to it.

Actual Behavior

"additionalDirectories": [
"D:\\Path\\To\\SecondDirectory"
]

What Should Happen?

Expected Behavior

"additionalDirectories": [
"D:\\Path\\To\\FirstDirectory",
"D:\\Path\\To\\SecondDirectory"
]

Error Messages/Logs

Steps to Reproduce

  1. Start Claude Code in a project directory
  2. Run /add-dir D:\Path\To\FirstDirectory
  3. Run /add-dir D:\Path\To\SecondDirectory
  4. Check .claude/settings.local.json

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.0.70

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

Windows Terminal

Additional Information

Workaround

Manually edit .claude/settings.local.json to include all directories.

View original on GitHub ↗

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