Skip to content

[Bug] Startup INFO logs (Auto-generation) cause MCP handshake timeout in VS Code (Stdio transport) #807

@gatspy

Description

@gatspy

When running Serena as an MCP server via stdio transport in VS Code (Copilot/Chat), the connection hangs indefinitely at Waiting for server to respond to 'initialize' request....

This issue does not occur when using claude-code CLI, but consistently fails in VS Code.

Steps to Reproduce

  1. Environment: macOS, VS Code, uv installed via mise.
  2. Target Project: A Go project (without an existing .serena folder or serena.toml).
  3. VS Code MCP Configuration:
    "serena": {
      "type": "stdio",
      "command": "uv",
      "args": ["run", "serena", "start-mcp-server", "--context", "ide-assistant", "--project", "."]
    }
  4. Launch VS Code.

Observed Behavior

VS Code shows: Waiting for server to respond to 'initialize' request... and eventually times out.

Server Logs (captured from stderr):

INFO  [MainThread] serena.config.serena_config:start:329 - Project configuration auto-generation starting ...
INFO  [MainThread] serena.config.serena_config:stop:336 - Project configuration auto-generation completed...

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