-
Notifications
You must be signed in to change notification settings - Fork 13.5k
CLI hangs/freezes when using @filename:line or @filename:range syntax #19985
Copy link
Copy link
Labels
area/coreIssues related to User Interface, OS Support, Core FunctionalityIssues related to User Interface, OS Support, Core Functionalityhelp wantedWe will accept PRs from all issues marked as "help wanted". Thanks for your support!We will accept PRs from all issues marked as "help wanted". Thanks for your support!priority/p2Important but can be addressed in a future release.Important but can be addressed in a future release.type/bug
Metadata
Metadata
Assignees
Labels
area/coreIssues related to User Interface, OS Support, Core FunctionalityIssues related to User Interface, OS Support, Core Functionalityhelp wantedWe will accept PRs from all issues marked as "help wanted". Thanks for your support!We will accept PRs from all issues marked as "help wanted". Thanks for your support!priority/p2Important but can be addressed in a future release.Important but can be addressed in a future release.type/bug
Type
Fields
Give feedbackNo fields configured for Bug.
Projects
Status
No status
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