[Bug] Gemini CLI Shows Numerous False-Positive ENOENT Errors on Launch
What happened?
When the Gemini CLI launches, it starts up successfully and is functional. However, the console is immediately flooded with a large number of [ERROR] [ImportProcessor] Failed to import ... ENOENT: no such file or directory messages.
These errors give the false impression that the CLI is broken or has failed to load critical components. The investigation revealed that the ImportProcessor is scanning markdown documentation files (e.g., README.md) and misinterpreting npx commands within code blocks as local file paths for MCP servers. This triggers the ENOENT errors for paths that were never intended to be resolved locally, creating significant noise in the startup logs.
[ERROR] [ImportProcessor] Failed to import zilliz/claude-context-core: ENOENT: no such file or directory, access '/Users/vmks/mcp-settings-nexus/reference/claude-context/packages/core/zilliz/claude-context-core' [ERROR] [ImportProcessor] Failed to import zilliz/claude-context-mcp: ENOENT: no such file or directory, access '/Users/vmks/mcp-settings-nexus/reference/claude-context/packages/mcp/zilliz/claude-context-mcp' [ERROR] [ImportProcessor] Failed to import upstash/context7-mcp: ENOENT: no such file or directory, access '/Users/vmks/mcp-settings-nexus/reference/context7/upstash/context7-mcp' Loaded cached credentials.
What did you expect to happen?
The Gemini CLI should launch cleanly without displaying spurious error messages. The ImportProcessor should be able to distinguish between example commands in documentation and actual server configurations, preventing it from trying to resolve and import packages from markdown files.
Client information
- CLI Version: 0.2.1
- Git Commit: 3a8ec2d8
- Session ID: 13b7e6ea-7cdd-4ff4-b121-1832b8745c8c
- Operating System: darwin v24.7.0
- Sandbox Environment: sandbox-exec (permissive-open)
- Model Version: gemini-2.5-pro
- Memory Usage: 363.4 MB
- IDE Client: Cursor
Login information
google acc
Anything else we need to know?
The CLI remains functional despite the errors. The primary impact of this bug is on user experience and trust. The flood of errors makes it difficult to identify genuine startup issues and can lead users to believe the application is not working correctly.
The suggested fix is to refine the ImportProcessor's discovery mechanism to only target specific configuration files (like mcp.json or settings.json) for loading MCP servers, and to explicitly ignore parsing for servers within markdown files.
Found possible duplicate issues:
- #6952
- #5437
- #2946
If you believe this is not a duplicate, please remove the status/possible-duplicate label.
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!
Hi - I'm still facing this issue - would be great if you can re-open this. Claude code says:
The ImportProcessor runs at startup regardless of which model you use. It's a CLI-level bug, not model-specific.
found it - if in your agents.md/cursor.md/etc.md is a line with @ and some filename, AI try to open it del this line or change a file name in it solved for me