-
Notifications
You must be signed in to change notification settings - Fork 9k
Description
What would you like to be added?
When Gemini CLI hangs in non-interactive mode, it is very difficult to debug the root cause. The logs often lack the necessary information to understand what the CLI is doing, which tool it's trying to use, or why it's stuck. This leads to a frustrating and time-consuming debugging experience.
In a recent case, the non-interactive session hanged for more than 15 mins (eventually killed) after printing the following information in the session logs:
Since there is no other information and nothing else was printed in the terminal, we are unable to debug the issue.
Why is this needed?
Improving the debuggability of Gemini CLI in these situations would significantly improve the developer experience. When the CLI hangs, developers need clear and actionable information to quickly diagnose and resolve the problem. The current lack of detailed logging makes it feel like a black box.
Specifically, we propose the following improvements:
-
Improved Logging: When a tool call is attempted, log the tool name and its parameters, even if the call is not successful or is not on the allowed list. This would have made it immediately obvious which tool was causing the issue.
-
Timeout for Tool Calls: Implement a timeout for tool calls. If a tool call hangs for an unreasonable amount of time, it should time out with a clear error message. In our case, the tool was hanging for over 15 minutes.
Additional context
No response