[BUG] --add-dir doesn't seem to work?
Status Fixed / completed
Maintainer reply ✓ Yes — rboyce-ant
Activity 5 comments · opened Jun 12, 2025 · closed Jun 23, 2025
💡 Likely answer: A maintainer (rboyce-ant, contributor)
responded on this thread — see the highlighted reply below.
Environment
- Platform (select one):
- [x] Anthropic API
- [ ] AWS Bedrock
- [ ] Google Vertex AI
- [ ] Other: <!-- specify -->
- Claude CLI version: 1.0.21 (Claude Code)
- Operating System: macOS
- Terminal: iTerm2
Bug Description
claude --add-dir /other-repo
I then ask claude about /other-repo and it acts like it doesn't know about it.
Steps to Reproduce
claude --add-dir /other-repo- ask
what is other-repo? - tells it knows nothing
Expected Behavior
Claude Code would recognize /other-repo as if it were part of the current project.
Actual Behavior
It didn't recognize.
Additional Context
None.
5 Comments
I'll add some additional context for the model, but for now if you use the
/absolute/path/to/other-repoClaude should figure out what you mean!Hmmm, absolute paths don't seem to help either. Or am I using it wrong? @rboyce-ant
!Image
The documentation and CLI help contradict each other.
!Image
I mean in your prompt, refer to
~/path/code/awsnews.info-apidirectly. Then Claude will know to try and list it. Right now Claude doesn't know thatawsnews.info-apirefers to a directory. An upcoming update will include that path in the system prompt by default, which should resolve this.This should be more visible to Claude now! Thank you for the report.
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.