openai / openai/codex

codex calls mcp on start in a loop, then crashes.

Open
#45,032 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug CLI mcp performance
Dominant language
Rust
Stars
125k
Forks
19.4k
PR merge metrics
PR metrics pending

Description

What version of Codex CLI is running?

0.154.0

What subscription do you have?

plus

Which model were you using?

not relevant

What platform is your computer?

Ubuntu 24.04.5 LTS

What terminal emulator and version are you using (if applicable)?

No response

Codex doctor report

What issue are you seeing?

Starting in a folder with 3 repos.

before I enter any prompt, it automatically calls my codebase memory mcp to try to find the repos etc. and somehow load it all in memory. This process leads to crash OOM.

That did not happen before and basically prevents now cross repository work, the easy simple way. without starting to give cross paths access etc.

What steps can reproduce the bug?

see issue I am seeing part.

What is the expected behavior?

no crash, not reading all the codes at start. and especially not all in memory.

Additional information

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue by starting Codex CLI in a folder containing three repositories and observe whether the configured codebase-memory MCP is called before any prompt. Trace the startup MCP initialization and verify that startup no longer loads all repositories into memory or crashes with an out-of-memory failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.