From d99e6b2ae2e2876e1e10fdbc804bd910618b0bc7 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 5 Nov 2025 21:00:24 +0000 Subject: [PATCH 1/2] Initial plan From ed48484261642ec6765f07a059ea474a03255e45 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 5 Nov 2025 21:08:29 +0000 Subject: [PATCH 2/2] Show compiler errors to users in mcp add command Restored display of compilation error messages in pkg/cli/mcp_add.go. The previous security fix was overly broad - compilation errors from CompileWorkflow() are already formatted for user display and don't contain sensitive information. These errors help users fix syntax and validation issues in their workflow files. The error is now printed to stderr as intended, while debug logs still capture the error details for troubleshooting. Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> --- pkg/cli/mcp_add.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pkg/cli/mcp_add.go b/pkg/cli/mcp_add.go index 0c252d6f80..4639b3eb0d 100644 --- a/pkg/cli/mcp_add.go +++ b/pkg/cli/mcp_add.go @@ -144,9 +144,8 @@ func AddMCPTool(workflowFile string, mcpServerID string, registryURL string, tra mcpAddLog.Print("Compiling workflow after adding MCP tool") compiler := workflow.NewCompiler(verbose, "", "") if err := compiler.CompileWorkflow(workflowPath); err != nil { - // Log generic error message to avoid exposing sensitive information - mcpAddLog.Print("Workflow compilation failed") - fmt.Println(console.FormatWarningMessage("Workflow compilation failed. Please check your workflow configuration.")) + mcpAddLog.Printf("Workflow compilation failed: %v", err) + fmt.Fprintln(os.Stderr, err) fmt.Println(console.FormatInfoMessage("You can fix the issues and run 'gh aw compile' manually")) } else { mcpAddLog.Print("Workflow compiled successfully")