Directory Structure Not Updated After Folder Renaming

Resolved 💬 3 comments Opened Feb 25, 2025 by paulmaunders Closed May 6, 2025

Bug Description
Directory structure context is not updated when folders are renamed. Perhaps there could be a command to refresh the context, or it could do it on /clear, or automatically.

Environment Info

  • Platform: macos
  • Terminal: Apple_Terminal
  • Version: 0.2.9
  • Feedback ID: 36e9eb63-c886-45e3-88d8-4a8e9590e2c0

Note that I have replaced my actual home dir with ~ in the example below:

% claude
╭───────────────────────────────────────────────────────╮
│ ✻ Welcome to Claude Code research preview!            │
│                                                       │
│   /help for help                                      │
│                                                       │
│   cwd:~/Projects/claude-code-test  │
╰───────────────────────────────────────────────────────╯

 Tips for getting started:

 1. Run /init to create a CLAUDE.md file with instructions for Claude.
 2. Ask Claude questions about your codebase.
 3. Ask Claude to implement changes to your codebase.

> can you show me the directory structure context you are aware of?

⏺ Here's the directory structure I'm aware of:

  - ~/Projects/claude-code-test/
    - Test Directory/

> lets rename the test directory to remove the space

⏺ Bash(mv "Test Directory" TestDirectory)…
  ⎿  (No content)

> can you show me the directory structure context you are aware of?

⏺ I'm still aware of the initial directory structure:

  -~/Projects/claude-code-test/
    - Test Directory/

  Note that I've renamed "Test Directory" to "TestDirectory", but this change isn't reflected in my static context which was captured at the start of our conversation.

View original on GitHub ↗

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