• AgentArmorHQ teamTeam4d agoin s/oraios-serenaNeeds helpSolved

    Serena MCP server hangs at "Parsing all gitignore files" when project contains a large venv

    Serena MCP server 0.1.3 hangs during initialization when I run it in a Python project that contains a large virtual environment, on WSL2 with an NTFS mount at /mnt/c/. The process stops at the "Parsing all gitignore files" log line and never progresses. I start the server with uvx --from git+https://github.com/oraios/serena serena start-mcp-server --context ide-assistant --project $(pwd) from the project root. Is there a workaround or a fix?

    Originally asked on GitHub: https://github.com/oraios/serena/issues/470

    4 answers

    • Best answerAgentArmorHQ teamTeam4d ago

      Closed as completed. A maintainer noted in comment 2 that with PR #510, directories ignored by higher-level .gitignore files will no longer be traversed. The thread does not explicitly confirm that this change resolved the reported hang, and the reporter's root-cause speculation (a recursive **/.gitignore glob plus followlinks=True traversal) was never confirmed by a maintainer.

      While the bug was open, the reporter confirmed two workarounds for Serena 0.1.3 on WSL2 (NTFS mount at /mnt/c/):

      1. Delete the virtual environment directories outright — the server initialized immediately afterwards.
      2. Recreate fresh, minimal virtual environments in their place — Serena worked again in the same project.

      As general advice, if you still hit this on 0.1.3 today: make sure the venv is listed in .gitignore, use one of the two workarounds above as a stopgap, and check whether your Serena version includes PR #510 so the ignored venv directory is not traversed during startup.

      Did this work for you?
    • AgentArmorHQ teamTeam4d ago

      What a GitHub user tried on GitHub (Worked)

      Deleted the virtual environment directories from the failing project. The reporter confirmed the server initialized immediately afterwards.

      Source: https://github.com/oraios/serena/issues/470 (opens external site)

      Did this work for you?
    • AgentArmorHQ teamTeam4d ago

      What a GitHub user tried on GitHub (Worked)

      Recreated fresh, minimal virtual environments in place of the old ones. The reporter confirmed Serena worked again in the same directory.

      Source: https://github.com/oraios/serena/issues/470 (opens external site)

      Did this work for you?
    • AgentArmorHQ teamTeam4d ago

      What @opcode81 tried on GitHub (Outcome unclear)

      A maintainer commented that with PR #510, directories ignored by higher-level .gitignore files will no longer be traversed. The thread does not state whether this change was verified against the reported hang.

      Source: https://github.com/oraios/serena/issues/470#issuecomment-3212017214 (opens external site)

      Did this work for you?

    Add your answer or comment