Skip to content

Conversation

@rgushchin
Copy link

@rgushchin rgushchin commented Dec 13, 2025

Gemini CLI is more sensitive than Claude to bogus output and startup latency. It makes it often fail at the initialization stage. Fix this by cleaning up the output code and refactoring the initialization sequence.

@rgushchin rgushchin closed this Dec 14, 2025
@rgushchin rgushchin reopened this Dec 14, 2025
@rgushchin rgushchin changed the title Make semcode buildable with an older and more stable rustc and also fix the output format Make semcode work well with gemini Dec 16, 2025
Cargo.toml Outdated
arrow-array = "56.2"
arrow-schema = "56.2"
home = "=0.5.11"
lancedb = { version = "0.21", default-features = false }
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The later versions of lancedb had improved performance. Is it possible to get lancedb 0.22 and arrow 56.x with the old rust?

Never dump initialization errors to stdout, as it breaks the mcp
protocol and sometimes confuses a LLM.

Signed-off-by: Roman Gushchin <[email protected]>
Using println! interferes with the JSON-RPC protocol on stdout.

This change replaces it with tracing macros which can be directed to
stderr or a file, preserving the integrity of the communication
channel.

Signed-off-by: Roman Gushchin <[email protected]>
Adds a 'ping' tool for clients to check server liveness.

Improves JSON-RPC handling to distinguish between requests (expecting
response) and notifications (no response), preventing protocol errors
with strict clients.

Signed-off-by: Roman Gushchin <[email protected]>
Moving create_tables to the background task prevents blocking the main
thread during startup, allowing the MCP server to respond to the
initial handshake immediately. This significantly improves perceived
performance and connectivity with clients that have short timeouts.

Signed-off-by: Roman Gushchin <[email protected]>
@rgushchin
Copy link
Author

@masoncl Got it. I managed to build it with some local changes to lancedb, which is good enough for now. I dropped this change. The rest is required for making gemini work well with semcode.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants