[BUG] CLI hangs when using "#" if CLAUDE.md has too many imports

Resolved 💬 3 comments Opened Oct 22, 2025 by dluc Closed Jan 11, 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?

When CLAUDE.md has too many imports, e.g.

You are a useful assistant

- See @docs/ARCH.md
- See @docs/GITHUB.md
- See @docs/GUIDELINES.md
- See @docs/LICENSE.md
- See @docs/REVIEWS.md
- See @docs/SECURITY.md
- See @docs/TESTING.md

- Always do Z
- Always do X

Using # to write to memory can lead to a stall and the process must be killed and restarted.

!Image

What Should Happen?

Scrolling through the list of memory files should work without hanging, regardless of the number of files.

Steps to Reproduce

Repro:

  1. Create CLAUDE.md as above
  2. Create the files imported by CLAUDE.md, make sure they are not empty.
  3. Write to memory using #
\# Always do Y
  1. Notice the long list of options, including the files imported by CLAUDE.md
  2. Notice how the list doesn't fit and you can scroll down

<img width="281" height="129" alt="Image" src="https://github.com/user-attachments/assets/3d6957c4-4a29-4a2e-981e-8e37b862c3f2" />

  1. Scroll down quickly
  2. The UI gets stuck, moving from option 4 to 5 back to 4 then 5 and so on
  3. The app becomes unresponsive and the process must be killed from the outside (CTRL+C, CTRL+D, CTRL+Z, ESC, none works)

Claude Model

None

Is this a regression?

I don't know, this is the first time I've used multiple import files.

Last Working Version

_No response_

Claude Code Version

2.0.25

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

iTerm2

Additional Information

Tested on multiple terminal apps and multiple projects.

View original on GitHub ↗

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