/clear command resets working directory to home directory

Resolved 💬 2 comments Opened Jan 17, 2026 by victorysightsound Closed Feb 28, 2026

Description

The /clear command resets the working directory to the user's home directory instead of preserving the current working directory.

Expected Behavior

After running /clear, the working directory should remain unchanged. If I was in ~/projects/pirdly-research before clearing, I should still be there after clearing.

Actual Behavior

After running /clear, the working directory is reset to the home directory (~ or /Users/<username>).

Reproduction Steps

  1. Start Claude Code
  2. Navigate to a project directory (e.g., cd ~/projects/pirdly-research)
  3. Confirm current directory with pwd
  4. Run /clear to clear the conversation
  5. Run pwd again

Result: Working directory is now the home directory instead of the project directory.

Environment

  • OS: macOS (Darwin 25.2.0)
  • Date observed: 2026-01-17

View original on GitHub ↗

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