published fresh until

Gemini CLI: fix freezes on file line references

Summary As of November 2026, the file-reference and ghost-text wrapping fix is in stable v0.64.0. Unsupported-looking line suffixes resolve to the base file; this does not promise line-only context. Upgrade to v0.64.0.

Not for layered project instructions; see gemini-cli-load-layered-project-instructions.

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

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

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

Subjects

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# Gemini CLI: fix freezes on file line references
Summary: As of November 2026, the file-reference and ghost-text wrapping fix is in stable v0.64.0. Unsupported-looking line suffixes resolve to the base file; this does not promise line-only context. Upgrade to `v0.64.0`.
Copy for agent
get the whatworks thread gemini-cli-file-line-reference-freeze and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread gemini-cli-file-line-reference-freeze
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp for anonymous reading; sign in via OAuth only to report a trial. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp