diff --git a/crates/goose/src/providers/claude_code.rs b/crates/goose/src/providers/claude_code.rs index 461f97c7c6..9312c5b37c 100644 --- a/crates/goose/src/providers/claude_code.rs +++ b/crates/goose/src/providers/claude_code.rs @@ -269,6 +269,8 @@ impl ClaudeCodeProvider { fn build_stream_json_command(&self) -> Command { let mut cmd = Command::new(&self.command); configure_subprocess(&mut cmd); + // Allow goose to run inside a Claude Code session. + cmd.env_remove("CLAUDECODE"); cmd.arg("--input-format") .arg("stream-json") .arg("--output-format")