diff --git a/cmd/anvilmcp/anvilmcp b/cmd/anvilmcp/anvilmcp index 5049ba2..87ce9fe 100755 Binary files a/cmd/anvilmcp/anvilmcp and b/cmd/anvilmcp/anvilmcp differ diff --git a/cmd/anvilmcp/main.go b/cmd/anvilmcp/main.go index 47cc736..fcaef46 100644 --- a/cmd/anvilmcp/main.go +++ b/cmd/anvilmcp/main.go @@ -285,7 +285,17 @@ func sendMessage(from, to, msgType, subject, body string) error { mailPath := fmt.Sprintf("agent/%s/mail", from) cmd := exec.Command("9p", "write", mailPath) cmd.Stdin = strings.NewReader(string(data)) - return cmd.Run() + + // Capture both stdout and stderr to get error messages + output, err := cmd.CombinedOutput() + if err != nil { + // Return the actual error message from 9p + if len(output) > 0 { + return fmt.Errorf("%s", strings.TrimSpace(string(output))) + } + return err + } + return nil } func listSessions() (string, error) {