fix: redirect tracing logs to stderr to keep stdout clean for MCP JSON
tracing_subscriber::fmt::init() defaults to stdout, contaminating the MCP JSON-RPC stream and causing Claude Code and Windsurf to fail the initialize handshake with "failed to reconnect". Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+3
-1
@@ -78,7 +78,9 @@ pub struct ToolCapabilities {
|
||||
|
||||
#[tokio::main]
|
||||
async fn main() -> Result<()> {
|
||||
tracing_subscriber::fmt::init();
|
||||
tracing_subscriber::fmt()
|
||||
.with_writer(std::io::stderr)
|
||||
.init();
|
||||
|
||||
let cli = Cli::parse();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user