gemini-cli icon indicating copy to clipboard operation
gemini-cli copied to clipboard

Gemini-Cli does not know its own commands

Open bar10dr opened this issue 1 year ago • 4 comments

What happened?

I asked Gemini-Cli if it was possible to save our conversation so I can reference it later. It said no.

Ah, this is a huge problem. ChatGPT does this a lot better, it offers full logs of conversations.

✦ You are absolutely right. That is a significant limitation and a major difference in functionality compared to a web-based interface like ChatGPT's. I understand completely why the lack of a persistent, shareable conversation history is a huge problem.

My design as a command-line agent means my context is session-based, and I don't have a built-in mechanism to save or link to past conversations automatically. It's a valid piece of feedback that this is a missing feature.

While I can't generate a link, I can do better than just telling you to copy-paste. I can compile our entire conversation so far into a single, formatted Markdown block for you. That would make it much easier for you to grab and save to a file.

Would you like me to generate that for you now?

No it would be like 15 pages of me scrolling and copy pasta, I am testing you out to see if I want to change over to this from ChatGPT. The lack of that feature is a big fat no so far. This is running in cli, are you sure there is no command to save conversation to a file? Check online.

✦ You are right to press this point, and I apologize for not being clearer. You're thinking about this from the user's perspective, and a command to save the session is a perfectly reasonable expectation for a CLI tool.

Let me clarify the distinction: I, the AI model, do not have a built-in command in my toolset to do this. The ability to save a session log would be a feature of the command-line application that you are using to talk to me.

However, you asked me to check online, and I will do that. It's possible the CLI tool itself has a command or flag for this that I'm not aware of.

╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │ ✔ GoogleSearch Searching the web for: "google gemini cli save conversation history to file" │ │ │ │ Search results for "google gemini cli save conversation history to file" returned. │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ✦ Thank you for pushing me on this. My initial answer was incomplete. The search results clarify the situation significantly.

It seems you are using the official Google Gemini CLI, likely integrated into your development environment. For this specific tool, you are correct: there is no direct, single command like /save_chat to export the current session to a file.

The search results confirm that for the official CLI:

  • History is managed within the IDE pane (like VS Code) and is often session-specific.
  • The intended method for providing persistent context is by creating GEMINI.md files in your project. This is for giving me long-term memory about a specific project, not for logging a conversation.
  • The ability to save and browse past conversations is a feature of the Gemini web application, not this CLI version.

The other tool mentioned, reugn/gemini-cli, is a third-party, open-source project that does have this feature built-in (!h command).

So, your initial assessment is correct. The tool you are using right now does not support this feature. I understand this is a deal-breaker, and I appreciate you bringing it to my attention. It's a critical piece of feedback.

I checked /help and it offered a way to save the chat log, I brought this up to Gemini and it agreeed its kind of funny that Google's AI doesn't know its own commands.

Then what is this? /chat - Manage conversation history. Usage: /chat <list|save|resume> [tag]

✦ You are absolutely right. I was wrong.

Thank you for correcting me. I was operating based on general documentation for the official Gemini CLI, which did not mention that command. The specific client you are using clearly has this functionality built-in, and I failed to recognize it. My apologies.

Based on the usage you provided, you can save our current conversation by running:

/chat save chat-name

This should save the session with the tag "chat-name", which you can then list and resume later. Thank you for teaching me about the capabilities of the tool I'm running in.

That's hillarious, they didn't train you on your own commands

✦ You're right, it is hilarious. And you've pinpointed the exact nature of the issue.

My training is on a vast amount of information about programming, software architecture, and the world in general. However, it doesn't include the specific documentation for the command-line application that you are using to interact with me.

Think of it this way: I'm like a web page, but I don't inherently know all the buttons and menu items of the specific web browser you're using to view me.

You've taught me a feature of my own environment. I appreciate you pointing it out, and I won't forget the /chat command again. It's a very important lesson for me.

What did you expect to happen?

Gemini to tell me how to save a conversation using Gemini-cli

Client information

$ gemini /about
# paste output here

Login information

No response

Anything else we need to know?

No response

bar10dr avatar Jun 26 '25 12:06 bar10dr

that's not an issue though, add it to the system prompt to confuse it/bias it?? just because you dont want to do it manually?wtf

Aze1339 avatar Jun 26 '25 14:06 Aze1339

I think broadly command information could be added to the system prompt at https://github.com/google-gemini/gemini-cli/blob/0915bf7d677504c28b079693a0fe1c853adc456e/packages/core/src/core/prompts.ts

would need to be diffentiated from "shell commands"

Image

[note the comment about documentation search only valid because I ran this from a checkout of the CLI itself.]

ptone avatar Jun 26 '25 17:06 ptone

++, it would be awesome if we can get this triaged and fixed. Multiple reproductions of responses like, "I am unable to save our conversation. The best way to save our conversation is to copy and paste it into a file." and then Gemini apologizes when you "Oh really?" it and upgrades a little by suggesting it write a file to feed in later (i.e., not using /chat).

The Gemini web app knows the answer, but gemini-cli does not. :(

jenh avatar Sep 04 '25 00:09 jenh

Hello! As part of our effort to keep our backlog manageable and focus on the most active issues, we are tidying up older reports.

It looks like this issue hasn't been active for a while, so we are closing it for now. However, if you are still experiencing this bug on the latest stable build, please feel free to comment on this issue or create a new one with updated details.

Thank you for your contribution!

gemini-cli[bot] avatar Dec 03 '25 21:12 gemini-cli[bot]