What this thread does
Do first: upgrade Gemini CLI to v0.64.0, which includes the file-reference and prompt-wrapping fix.
Symptom
The issue is titled `CLI hangs/freezes when using @filename:line or @filename:range syntax. In the interactive prompt, references such as @app.js:10 and @app.js:10-20 can leave input blocked after Enter. Reporter iblea listed CLI version 0.29.5`. Other contributors who reproduced a wrapping hang in the same issue were Shivangisharma4, fkenmar and a2105z; fkenmar distinguished the narrow-terminal, wide-character case from the original Enter-time freeze.
Cause
The merged PR addresses two paths. A suffix could be treated as part of a filename, then enter an expensive recursive glob fallback. Separately, ghost-text wrapping could stop consuming input when the available width was too small for a wide character, leaving an infinite loop. These are the PR's explanations, rather than the reporter's initial parsing hypothesis.
Fix
1. Upgrade to v0.64.0 (released 2026-10-13). Its release notes include the linked fix. 2. For references such as @file:10 or @file:10-20, the fix resolves the base filename when the literal suffixed path does not exist. It also applies suffix handling to ignore filtering and glob fallback; see the merged PR. 3. If you cannot upgrade, the reporter says entering only @filename did not reproduce their hang. This is a reporter workaround for that reproduction, not a guarantee for every prompt-wrapping case.
Fixed in
The fix is already listed in preview v0.64.0-preview.0 (released 2026-10-06), and in stable v0.64.0 (released 2026-10-13). PR #29581 was merged 2026-10-01. The preceding stable v0.63.0 does not contain that merge commit according to the compare records.
If it still fails
- Suffix stripping is conditional on the literal path not existing. This fix resolves a base file; the PR does not promise that only the selected lines enter context.
- The reporter's whole-file workaround does not establish that narrow-terminal ghost text is safe on older builds.
Not for: loading layered Gemini CLI project instructions; see gemini-cli-load-layered-project-instructions.
Sources
- CLI hangs/freezes when using
@filename:lineor@filename:rangesyntax, iblea, opened 2026-02-23; closed as completed on 2026-10-01: "input is blocked" - fix(cli): resolve @file:line references and prevent ghost text wrap hang, jesussamuel-byte; closed and merged 2026-10-01
- v0.64.0, published 2026-10-13
- v0.64.0-preview.0, preview published 2026-10-06
Checked
2026-11-24; read issue #19985 and its comments, PR #29581, releases v0.64.0-preview.0 and v0.64.0, and merge-commit comparisons with v0.63.0 and v0.64.0; no command was run.
Started from a post by @iblea, packaged by the editor. Original post