Had to prompt the CLI to reread GEMINI.md
What happened?
I was creating GEMINI.md for my team, but even after it knew file existed I had to prompt it to reread it for it to pick up changes.
Not sure if there is a better way to attach logs/history (Internal Google usage)
What did you expect to happen?
Before executing a command, it may make sense to check if the chain of GEMINI.md has changed. Not a big del, but just a small little gotcha that is probably not that expensive to check.
Client information
- CLI Version: 0.1.11
- Git Commit: d1596ced
- Operating System: linux v18.17.0
- Sandbox Environment: no sandbox
- Model Version: gemini-2.5-pro
- Memory Usage: 315.5 MB
Login information
No response
Anything else we need to know?
No response
could i solve it?
This is an excellent observation and you've correctly described the intended behavior of the system. It's not a bug, but a fundamental design choice related to how the agent manages its context.
Here's what's happening:
- Context on Startup: The agent reads the GEMINI.md file once at the beginning of a session and loads it into its working memory.
- Performance over Real-time: To ensure fast and responsive interaction, the agent does not continuously check the file system for changes during an active session. Constant file I/O would slow down every response.
Your Expectation and the Solution:
You are absolutely right. When you edit GEMINI.md, the agent won't know about the changes until you explicitly tell it to. The "small little gotcha" you found is the correct and intended workflow.
To make the agent aware of changes, you need to give it a prompt like:
"Please reread your
GEMINI.mdfile, I have made changes." "Update your context from theGEMINI.mdfile."Alternatively, starting a new session will always load the latest version of the file.
So, your suggestion to 'check if the GEMINI.md has changed' is spot on, but the current design requires you, the user, to trigger that check manually for performance reasons. It's a trade-off between speed and automatic context awareness.
Does not the last one do it already since the beginning?:
╭──────────────────────────────────────────────╮ │ > /memory │ ╰──────────────────────────────────────────────╯
show Show the current memory contents. add Add content to the memory.
=> refresh Refresh the memory from the source.
=> refresh Refresh the memory from the source
Re comment this being by design, FWIW, Claude Code does this right and will pick up on CLAUDE.md changes
That's a valid point on performance. I was wondering if a file-watching library like chokidar might be a good solution here. From what I understand, it uses native OS events instead of constant polling, so it could potentially allow us to refresh the context on change without much overhead. It might be a way to improve the user experience while keeping the performance impact low. What do you all think?
Does not the last one do it already since the beginning?:
╭──────────────────────────────────────────────╮ │ > /memory │ ╰──────────────────────────────────────────────╯ show Show the current memory contents. add Add content to the memory. => refresh Refresh the memory from the source.
=> refresh Refresh the memory from the source
Does this work? Does it refresh all the files? How does it do this exactly? Will the updated files be inserted again into context (so both the old versions and new versions would be in context) or will the old versions be replaced with the new versions? (This might invalidate the conversation history which started from the old versions.)
Thanks for the great discussion on this issue.
As pointed out above, the current behavior of manually updating the GEMINI.md file is a design choice to optimize for performance.
For now, if you make changes to GEMINI.md, you can use the '/memory refresh' command to have the CLI load the updated file.