[BUG] tab completion changes entire prompt in undesirable ways

Resolved 💬 2 comments Opened Jan 20, 2026 by kojiromike Closed Jan 20, 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 I try to tell Claude Code to read a file on the filesystem, it goes something like this:

> Please read @~/Downloads/foo.pdf and do such-and-such

The part after the @ involves tab completing the name. Recently, that has become buggy and frustrating. I'll type @ and the list of possible completions will appear. I'll select the one I want, and hit <tab> to finish typing. Then after I'm ready to submit, I'll click <enter>, and instead of submitting the line, claude code will alter the line further, mutating it to something I didn't mean.

Basically, any time I hit <enter> after starting @ tab completion, the prompt removes some of my, human-written, prompt text and replaces it in whole or in part with the tab completion result.

What Should Happen?

Tab completion should be pretty compartmentalized -- it should not escape the specific confines of what is being completed.

Error Messages/Logs

Steps to Reproduce

Before hitting enter:

<img width="847" height="128" alt="Image" src="https://github.com/user-attachments/assets/62390705-3b21-476e-89ed-d77108d36783" />

After hitting enter (the word "label" replaced with redundant completion):

<img width="846" height="152" alt="Image" src="https://github.com/user-attachments/assets/b3356591-dd06-4f42-b8ae-f7c28d498b6c" />

Or, if I hit enter right after tab completion (note it deletes the word "read"):

<img width="431" height="131" alt="Image" src="https://github.com/user-attachments/assets/97b0a43a-be0d-4431-afa0-557bc2816d0f" />

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.1.12 (Claude Code)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

_No response_

View original on GitHub ↗

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