[BUG] File reference autocomplete (@+TAB) erases previously typed text
Resolved 💬 2 comments Opened Mar 10, 2026 by omermosko4 Closed Apr 8, 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 typing a prompt that includes text and then inserting a file reference using @ followed by TAB to autocomplete the file path, all previously typed text is removed. Only the autocompleted file path remains in the input field.
What Should Happen?
TAB autocomplete should only replace/complete the @-referenced file path portion, preserving all other text already typed in the input.
Error Messages/Logs
_No error messages — the text is silently removed._
Steps to Reproduce
- Open Claude Code in the terminal
- Start typing a prompt, e.g.
Please review this file - Type
@to begin a file reference - Start typing a partial file path
- Press TAB to autocomplete the path
- Observe that all text typed before the
@reference is gone — only the autocompleted file path remains
Claude Model
Opus
Is this a regression?
I don't know
Claude Code Version
2.1.72 (Claude Code)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Warp
Additional Information
_No response_
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗