You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When attempting to reference a specific line or range of a file using the syntax @filename:line (e.g., @app.js:10) or @filename:start-end (e.g., @app.js:10-20), the CLI becomes unresponsive (hangs) and requires a force quit.
It seems the CLI might be trying to resolve the entire string (including the colon and numbers) as a file path, or it gets stuck in an infinite loop trying to parse the syntax.
Steps to Reproduce:
Start gemini-cli.
Type a prompt including a file reference with line numbers.
Example: Explain this function @src/main.js:15-25, @src/main.js#L10-#L25, @src/main.js:10 or @src/main.js#L10.
Press Enter.
The CLI freezes (cursor might blink, but no output or response occurs, and input is blocked).
Ctrl+C often fails to interrupt the process immediately.
What did you expect to happen?
Ideal: The CLI should read only the specified lines of the file, similar to other AI CLI tools (e.g., Claude Code).
I initially thought range reading was supported, but later realized it is not.
Fallback: If this syntax is not supported, it should return a clear error message (e.g., "File not found" or "Line number syntax not supported") instead of hanging indefinitely.
Client information
Client Information
Run gemini to enter the interactive CLI, then run the /about command.
> /aboutAbout Gemini CLICLI Version 0.29.5Git Commit 2ef872e73Model gemini-3-pro-previewSandbox no sandboxOS darwinAuth Method Logged in with GoogleTier Gemini Code Assist in Google One AI Pro
Login information
Google Account
Anything else we need to know?
I noticed this syntax (@filename:line) works seamlessly in other AI CLI tools (like Claude Code), which led to the confusion. If this feature is not supported in gemini-cli, a graceful failure with an informative error message would be much better than a freeze. This issue significantly disrupts the workflow as it forces a restart of the CLI session.
What happened?
When attempting to reference a specific line or range of a file using the syntax
@filename:line(e.g.,@app.js:10) or@filename:start-end(e.g.,@app.js:10-20), the CLI becomes unresponsive (hangs) and requires a force quit.It seems the CLI might be trying to resolve the entire string (including the colon and numbers) as a file path, or it gets stuck in an infinite loop trying to parse the syntax.
Steps to Reproduce:
gemini-cli.Explain this function @src/main.js:15-25,@src/main.js#L10-#L25,@src/main.js:10or@src/main.js#L10.Ctrl+Coften fails to interrupt the process immediately.What did you expect to happen?
I initially thought range reading was supported, but later realized it is not.
Client information
Client Information
Run
geminito enter the interactive CLI, then run the/aboutcommand.Login information
Google Account
Anything else we need to know?
I noticed this syntax (
@filename:line) works seamlessly in other AI CLI tools (like Claude Code), which led to the confusion. If this feature is not supported ingemini-cli, a graceful failure with an informative error message would be much better than a freeze. This issue significantly disrupts the workflow as it forces a restart of the CLI session.Vedio
gemini_bug.mp4