Skip to content

Reached max indexed file limit of 5000; stopping #33

Open

Description

@smkingsoft

I am running CodeGraph as a pod with the following startup parameter: ENTRYPOINT ["codegraph-server","--max-files","30000"].
However, when I use the VS Code extension to run CodeGraph for Java code analysis, I encounter the following error:
[2mcodegraph_server::indexer�[0m�[2m:�[0m Reached max indexed file limit of 5000; stopping
It appears that the --max-files setting has not taken effect.

user 3306053 3304939 0 14:44 ? 00:00:01 podman run --rm -i --userns=keep-id -v /media/vdd/user/jdk21/src:/media/vdd/user/jdk21/src -w /media/vdd/user/jdk21/src -e HOME=/media/vdd/user/jdk21/src localhost/codegraph-ai:0.21.0
user 3306149 3306132 99 14:44 ? 00:45:40 codegraph-server --max-files 30000

$codegraph-server-linux-x64 --version
codegraph-server 0.21.0

Activity

  1. anvanster commented on Nov 15, 2026

    @anvanster
    Member

    Thanks for the report. Confirmed: in 0.21.0 the --max-files flag was only applied in MCP mode. When the engine runs as an LSP server for the VS Code extension, the indexer used its built-in default of 5,000 files and ignored the flag. I reproduced it over LSP stdio on a 5,500-file workspace: with --max-files 30000, indexing still stopped at 5,000.

    Fixed in #35:

    • --max-files (and --exclude-dirs) are now applied in LSP mode, so your codegraph-server --max-files 30000 entrypoint works as expected.
    • There is a new VS Code setting, codegraph.maxFiles. A positive value overrides the engine flag; 0 (the default) defers to --max-files. The JetBrains plugin gets the same setting.
    • The limit warning now names both --max-files and codegraph.maxFiles, so it's clear how to raise it.

    The fix will be included in the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions