Managing PreventUserIdleSystemSleep on MacBook
The value of that setting is not the only factor involved. I don't have a 0 for the PreventUserIdleSystemSleep and my MacBook Pro sleeps fine when I close the lid. Still, if you kill the process in question (the terminal command for your example would be "kill 10945"), you might be able see whether that could be involved. If that's all it took to let the computer sleep, then you'd have a way to manage it.

I'll give you an AppleScript that will let you kill the processes that give PreventUserIdleSystemSleep a "1". You can run the script, enter admin password to confirm when prompted, then run "pmset -g assertions" in Terminal again to confirm that they're all gone. Then close the lid to see if the MacBook sleeps. I can't promise that doing it won't lock up your computer or make it shut down, so be ready for that.

repeat
try
    set pid2kill to word 2 of (do shell script "pmset -g assertions | egrep \"PreventUserIdleSystemSleep named\"")
    do shell script "kill" &amp; space &amp; pid2kill with administrator privileges
on error
    exit repeat
end try
end repeat