diff --git a/.blue/docs/spikes/2026-01-25-Inconsistent Worktree Creation in Claude MCP.md b/.blue/docs/spikes/2026-01-25-Inconsistent Worktree Creation in Claude MCP.md new file mode 100644 index 0000000..92d4549 --- /dev/null +++ b/.blue/docs/spikes/2026-01-25-Inconsistent Worktree Creation in Claude MCP.md @@ -0,0 +1,17 @@ +# Spike: Inconsistent Worktree Creation in Claude MCP + +| | | +|---|---| +| **Status** | In Progress | +| **Date** | 2026-01-25 | +| **Time Box** | 2 hours | + +--- + +## Question + +Why are worktrees and feature branches not being consistently created when using Blue MCP in Claude? What triggers (or fails to trigger) worktree creation? + +--- + +*Investigation notes by Blue* diff --git a/apps/blue-cli/src/main.rs b/apps/blue-cli/src/main.rs index 24d8d04..67883bc 100644 --- a/apps/blue-cli/src/main.rs +++ b/apps/blue-cli/src/main.rs @@ -1529,6 +1529,15 @@ async fn detect_ollama_model() -> Option { // ==================== Semantic Index Commands (RFC 0010) ==================== async fn handle_index_command(command: IndexCommands) -> Result<()> { + // Run the blocking indexer operations in a separate thread + // to avoid runtime conflicts with reqwest::blocking::Client + tokio::task::spawn_blocking(move || { + handle_index_command_blocking(command) + }).await??; + Ok(()) +} + +fn handle_index_command_blocking(command: IndexCommands) -> Result<()> { use blue_core::store::DocumentStore; use blue_core::{Indexer, IndexerConfig, is_indexable_file, LocalLlmConfig}; use blue_ollama::OllamaLlm; diff --git a/crates/blue-core/src/indexer.rs b/crates/blue-core/src/indexer.rs index 9895387..16c4dd9 100644 --- a/crates/blue-core/src/indexer.rs +++ b/crates/blue-core/src/indexer.rs @@ -106,7 +106,7 @@ impl Indexer

{ let options = CompletionOptions { max_tokens: self.config.max_tokens, temperature: self.config.temperature, - stop_sequences: vec!["```".to_string()], // Stop at end of YAML block + stop_sequences: vec![], // Let model complete naturally }; let completion = self.provider.complete(&prompt, &options)