Skip to content

Leaving CLI Open Creates Memory + Context Window Bugs #25211

@micahasmith

Description

@micahasmith

What happened?

If i walk away from a running CLI for an extended period of time, the memory usage grows and when i return i can neither /compress the size back down nor run any commands as the increased memory also leads to context being too long to submit to the API.

What did you expect to happen?

My expectation what that no changes to memory or anything affecting context window would occur while away.

Client information

Client Information

Run gemini to enter the interactive CLI, then run the /about command.

> /about
│                                                                                                                                                                                    │
│ About Gemini CLI                                                                                                                                                                   │
│                                                                                                                                                                                    │
│ CLI Version                                                   0.37.1                                                                                                               │
│ Git Commit                                                    3b2d4f100                                                                                                            │
│ Model                                                         Auto (Gemini 3)                                                                                                      │
│ Sandbox                                                       no sandbox                                                                                                           │
│ OS                                                            darwin                                                                                                               │
│ Auth Method                                                   gemini-api-key```

</details>

### Login information

API_KEY

### Anything else we need to know?

_No response_

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/agentIssues related to Core Agent, Tools, Memory, Sub-Agents, Hooks, Agent Qualitystatus/need-triageIssues that need to be triaged by the triage automation.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions