[BUG] πͺ²@ file autocomplete broken in Cursor terminal after npm β native migration
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 using Claude Code CLI (not the VS Code/Cursor extension) in Cursor's integrated terminal (WSL2), typing @ to reference a file does not show any autocomplete suggestions. The @ character appears but no file suggestion dropdown is displayed. The Claude Code extension is installed but not used β this is purely a CLI issue.
The same feature works correctly in:
- A standalone terminal (Ubuntu/WSL launched from PowerShell)
- VS Code's integrated terminal (same WSL2 setup, same native binary)
This is Cursor-specific β VS Code and Cursor both use xterm.js, yet only Cursor is affected.
What Should Happen?
What Should Happen?
Typing @ followed by characters should display a file autocomplete dropdown with matching file suggestions, as it does in standalone terminals.
Error Messages/Logs
No error messages β the @ character simply appears without triggering any autocomplete UI.
Error Messages/Logs
N/A - a silent monster.
Steps to Reproduce
- Install Claude Code native version via
claude install(migrating from npm version) - Open Cursor (VS Code fork) connected to WSL2 (Ubuntu)
- Open the integrated terminal in Cursor
- Run
claudeto start a Claude Code CLI session - Type
@READMEor any partial filename - Observe: no autocomplete suggestions appear
- Open PowerShell on Windows and launch Ubuntu (WSL)
- Run
claudeand type@README - Observe: autocomplete suggestions appear correctly
- Open VS Code connected to the same WSL2 (Ubuntu), open integrated terminal
- Run
claudeand type@README - Observe: autocomplete suggestions appear correctly β the feature works in VS Code but not Cursor
Claude Model
Opus
Is this a regression?
Yes, this worked in a previous version
Last Working Version
v2.1.17 via npm. After running claude install, the native version was also v2.1.17 β @ autocomplete was immediately broken on the native build. Upgraded to v2.1.29 (latest) β no change, @ autocomplete still does not work.
Claude Code Version
2.1.29
Platform
Anthropic API
Operating System
Ubuntu/Debian Linux
Terminal/Shell
Cursor
Additional Information
- Cursor version: 2.4.27
- WSL2 Ubuntu, Claude Code installed natively via
claude install - Previously used npm-installed Claude Code where @ autocomplete worked in the same Cursor terminal
TERM=xterm-256color,TERM_PROGRAM=vscode- ripgrep v14.1.0 is installed
/doctorreports no issues- Troubleshooting attempted with no effect:
- Updated from v2.1.17 to v2.1.29
- Disabled Claude Code extension in Cursor (issue persists whether extension is enabled or disabled)
- Tested on both stable (v2.1.17) and latest (v2.1.29) channels β issue persists on both
- Launched with
TERM_PROGRAM=xterm claude - Launched with
VSCODE_INJECTION=0 claude - Ran inside
tmuxwithin Cursor's terminal - Works in VS Code integrated terminal (same WSL2, same native binary) β issue is Cursor-specific, not a general xterm.js problem
- Suggests the native binary's terminal rendering has a compatibility issue specific to Cursor's terminal implementation
Migration Steps Followed
Originally installed Claude Code via npm in May 2025. Migrated only because Claude Code continually showed this message on every launch:
Claude Code has switched from npm to native installer. Run claude install or see <https://docs.anthropic.com/en/docs/claude-code/getting-started> for more options.
Followed these exact steps:
cp -r ~/.claude ~/dot-claude-backup- Ran
claude install(installs the native version) - Ran
npm uninstall -g @anthropic-ai/claude-codeto clean up the old npm package - Ran
npm list -g @anthropic-ai/claude-codeto verify the npm package is gone - Ensured
~/.local/binis in PATH - Verified with
claude --versionandclaude doctor
The @ autocomplete worked before this migration in the same Cursor integrated terminal with the npm version.
This issue has 3 comments on GitHub. Read the full discussion on GitHub β