If you spend your life in the terminal, you already know the friction.
You spin up an AI agent, ask it to refactor a component, and spend the first 500 tokens reminding it how your Vue.js state management works or what your Python linting rules are.
It is exhausting. It is inefficient.
The Gemini CLI v0.40.0 update just dropped, and it fundamentally rewrites how local AI interacts with your file system.
This isn’t just a patch with 150+ minor tweaks, it is a structural shift toward autonomous, persistent, and local-first memory.
I know a lot of you are going to be very happy ;)
Here‘s a quick article on the new memory architecture, the automated skill extraction, and why your current CLI workflow is obsolete:
Firstly,
The Death of AI Amnesia (Tiered Memory)
The fatal flaw of most CLI agents is context collapse.
You either manually paste your architecture rules into every prompt, or you rely on a clunky, opaque database that the agent randomly queries.
Gemini v0.40.0 killed the legacy save_memory tool.
Instead, they built a transparent, four-layer "Tiered Memory" architecture.
The agent now persists context by directly editing standard Markdown files that live exactly where they belong.
- Global (
~/.gemini/GEMINI.md): This is your developer DNA. This file holds your cross-project personal preferences and coding styles (e.g., your strict Python typing rules or FastAPI structuring). It follows you into every workspace automatically. - Project (
./GEMINI.md): Committed directly to your repo. This holds the team-shared conventions, architecture rules, and specific deployment workflows for that specific codebase. - Subdirectory (e.g.,
./src/GEMINI.md): Highly specific micro-instructions scoped to a single part of your project. - Private (
MEMORY.md): Your local machine setups and private notes that never get pushed to version control.
You no longer prompt the agent on how to behave.
You configure the environment, and the agent inherits the context based on its working directory.
Secondly,
Auto Memory: The Background Skill Extractor
This is the feature that changes the unit economics of your time.
If you solve a brutal deployment bug on Tuesday, you shouldn’t have to relearn how you fixed it on Friday.
By enabling experimental.autoMemory: true in your settings, Gemini spins up a background extraction agent.
When your session goes idle, this agent combs through your transcripts (specifically sessions with 10+ messages) to identify recurring procedural patterns and hard-won fixes. It automatically drafts these workflows into new SKILL.md files.
You simply type /memory inbox to review what it learned.
You inspect the logic, trace it back to the original session, and promote it to your permanent Global or Project library.
The CLI is literally learning your specific engineering solutions in the background.
Now, the next one is
The UI Fix or Killing the Output Spam
If you use TUI or CLI tools heavily, screen real estate is sacred.
Previous iterations of AI agents spammed the terminal with endless tool calls showing you every single file read, directory list, and web search in excruciating detail.
Gemini fixed the visual hierarchy:
- Compact Tool Outputs: File reads and searches are now structured and minimized. No more massive tool boxes hijacking your terminal buffer.
- Topic Narrations: Instead of the agent spewing out “I am going to search the memory system to see how it works,” it outputs clean, descriptive headers (e.g., Researching Memory System). You can scan the agent’s progress without reading a wall of text.
- Native OS Notifications: They integrated OSC 777 support. You can kick off a massive multi-file refactor, tab out, and get a native desktop ping when the agent finishes or needs human intervention.
This release clearly has laid the groundwork for a fully localized future.
Edge Compute and Task Tracking
They introduced Local Gemma for Model Routing (enable via /settings).
Instead of burning API tokens just to figure out which tool to use, the CLI uses a local instance of Gemma to handle the intelligent routing.
This is the first step toward full local model execution.
They also deployed an experimental Task Tracker.
Instead of the LLM trying to hold a 15-step objective in its fragile active context window, it maintains an internal, persistent checklist. It writes down what it needs to do, checks it off, and monitors its own progress, drastically reducing the hallucination rate on long-horizon tasks.
Add in bundled ripgrep binaries for lightning-fast offline searching, and tightened shell-command allowlists to prevent injection attacks, and the tool is finally production-ready.
Now,
You can keep using your CLI like a basic chat window, treating every session like it’s day one.
Or, you can pull v0.40.0, set up your Global memory rules, enable the Auto Memory extraction, and let the agent compound its intelligence based on your actual codebase.
The developers who figure out how to leverage persistent local memory will ship twice as fast as the developers who are still typing “write this in Vue, use the composition API, and don’t forget to…” into the prompt every single morning.
So,
Run /new and build the architecture.
Will you?
In case we are meeting for the first time, come over here, it’ll be worth the roller coaster of articles that are gonna come up in the next few weeks.
I swear tracking these updates is a job in itself, lately.
Here’s the list which I’ve built and keep adding on.
And If you need help for analyzing UFC fights, please check out BoutPredict :)