diff --git a/backend/src/executors/opencode.rs b/backend/src/executors/opencode.rs index dea666a6..9403755f 100644 --- a/backend/src/executors/opencode.rs +++ b/backend/src/executors/opencode.rs @@ -44,7 +44,7 @@ impl Executor for OpencodeExecutor { // Use shell command for cross-platform compatibility let (shell_cmd, shell_arg) = get_shell_command(); - let opencode_command = format!("opencode -p \"{}\"", prompt.replace('"', "\\\"")); + let opencode_command = format!("opencode -p \"{}\" --output-format=json", prompt.replace('"', "\\\"")); let mut command = Command::new(shell_cmd); command @@ -82,7 +82,7 @@ impl Executor for OpencodeFollowupExecutor { // Use shell command for cross-platform compatibility let (shell_cmd, shell_arg) = get_shell_command(); - let opencode_command = format!("opencode -p \"{}\"", self.prompt.replace('"', "\\\"")); + let opencode_command = format!("opencode -p \"{}\" --output-format=json", self.prompt.replace('"', "\\\"")); let mut command = Command::new(shell_cmd); command