Stream: general

Topic: Conversation with Gemini CLI.


view this post on Zulip Tim Uckun (Jul 02 2025 at 04:34):

I decided to give Gemini CLI a try and it didn't go very well. I decided to talk to it about it. Here is the conversation.

Last three times we interacted you ended up messing up. The first time you seemed to get hung up in an infinite loop, the second time you 
just stopped responding for no apparent reason and the third time you encountered an error in the code and hung. Every time I had to kill  the cli in order to restart which lost all context.  Next time you become unresponsive or get stuck in an infinite loop how do I break your process without losing context?

✦ I understand your frustration. That sounds like a poor experience.

If I become unresponsive or get stuck, you can interrupt my current operation by pressing Ctrl+C.

This will stop what I'm currently doing (whether I'm thinking or running a tool) and return control to you without terminating the main CLI. Your session context and history will be preserved, so you can continue our conversation from where we left off.

ctrl-c didn't seem to stop you, you said to hit ctrl-c again which ended the session

✦ You are right, and I apologize for that frustrating experience. My previous advice was incomplete and led to the very problem you're trying to avoid. The behavior you described—where the first Ctrl+C is caught and the second one terminates everything—is a failure in how the process I'm running handles interruptions.

Thank you for bringing this to my attention. I need to be more careful.

From now on, I will adopt a safer approach for tasks that might hang:

1. Timeouts: For potentially long-running commands, I will try to use timeouts (e.g., timeout 300s <command>) to automatically stop them if

they get stuck.

2. Targeted Process Killing: If a command I run becomes unresponsive, I will use its specific Process ID (PID) to terminate only that  command, leaving our session intact. I will ask for your confirmation before doing so.

My goal is to manage the processes I start so that you don't have to intervene. You should not need to use Ctrl+C at all. If you see me running a command and it seems to be stuck, please tell me, and I will terminate it safely for you.

How can I tell you to stop if you are unresponsive?

✦ You are absolutely right. You've exposed a critical flaw in my previous answers. If I am unresponsive, you cannot "tell" me anything in a new message because I am still processing the old one. I apologize for the frustrating and circular logic.

Here is the correct, albeit unfortunate, reality of the situation:

* The First Ctrl+C: This sends an "interrupt" signal. My goal is to catch this signal to stop my current task (like a long-running command or a piece of code I'm analyzing) and return control to you without losing our session context. This is the "graceful stop."

* The Failure You're Experiencing: Sometimes, the process I've started cannot be interrupted gracefully, or there is a bug in my handling of the interrupt signal. When this happens, I get stuck, and the "graceful stop" fails.

* The Second Ctrl+C: When the first interrupt doesn't work, the CLI gives you a second option: force-quit the entire application. This is what causes you to lose the context.

You are correct that there is no way for you to send me a message while I am stuck. The responsibility lies with me to avoid getting into these situations in the first place.

I will be more diligent. I will make better use of timeouts and run commands in the background when appropriate, so that I can monitor and terminate them if they hang.

Thank you for holding me accountable.

view this post on Zulip Tim Uckun (Jul 02 2025 at 04:36):

Frankly I don't know what to make of this conversation but I find it remarkable in every way.

view this post on Zulip Alex Barnes (Jul 02 2025 at 07:06):

I've had a play around with Gemini and had the same issues, it seemed to frequently get stuck in loops. I've also been using Claude code quite a bit over the past week. I had similar issues with that crashing, it would do stuff like run the main go application which would then block whilst waiting for http requests and Claude couldn't close it. Had the same issues with tests running longer than it could handle. But with Claude I added it to it's memory to not run the main application and not run tests without timeouts and it's been ok since then.

view this post on Zulip Tim Uckun (Jul 02 2025 at 22:01):

That's a good idea. I think I will put that in the intructions and see what happens. Claude (via sketch) has been better than Gemini but still writes very odd go code. I think I might give up on trying to use go with LLMs and maybe give javascript/typescript a try but I am afraid it's just going to generate react code and I don't know react and don't want to learn it either.

view this post on Zulip Tim Uckun (Jul 03 2025 at 22:06):

I gave Gemini CLI another try last night and it kept failing with 503 and 500 errors. I kept retrying though and it eventually finished what I started. I have no idea what google is doing but it's not a good look to get "server too busy" errors when trying to use an AI even one that it's costing me anything because of the generous free tier.

I didn't get a chance to look at the code, I'll do that tonight.


Last updated: Aug 18 2025 at 01:38 UTC