[BUG] plansDirectory does not expand tilde (~) in path

Resolved 💬 3 comments Opened Apr 7, 2026 by korryu3 Closed Jun 5, 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?

The plansDirectory setting in settings.json does not expand ~ in path values.
Setting "plansDirectory": "~/my-plans" creates a literal ~/ directory in the current working directory instead of resolving to the user's home directory.

This is inconsistent with other settings — for example, statusLine.command successfully resolves ~ in its path ("command": "~/.claude/statusline.py").

Related: #38385 reports a similar issue with ${PATH} not expanding in env settings on Windows.

What Should Happen?

~ at the start of a path should be expanded to the user's home directory, consistent with how statusLine.command already works.

Error Messages/Logs

Steps to Reproduce

  1. Add "plansDirectory": "~/my-plans" to ~/.claude/settings.json
  2. Start Claude Code and enter Plan Mode
  3. A literal ~/ directory is created in the current working directory instead of plans being saved to $HOME/my-plans/

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.91

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

Hardcoding absolute paths works as a workaround, but breaks dotfiles portability across machines with different usernames.

View original on GitHub ↗

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