[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

  1. Open Claude Code in the terminal
  2. Start typing a prompt, e.g. Please review this file
  3. Type @ to begin a file reference
  4. Start typing a partial file path
  5. Press TAB to autocomplete the path
  6. 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_

View original on GitHub ↗

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