diff --git a/lxd-agent/exec.go b/lxd-agent/exec.go
index <HASH>..<HASH> 100644
--- a/lxd-agent/exec.go
+++ b/lxd-agent/exec.go
@@ -235,7 +235,7 @@ func (s *execWs) Do(op *operations.Operation) error {
 		stderr = ttys[2]
 	}
 
-	controlExit := make(chan bool)
+	controlExit := make(chan bool, 1)
 	attachedChildIsBorn := make(chan int)
 	attachedChildIsDead := make(chan bool, 1)
 	var wgEOF sync.WaitGroup
lxd-agent/exec: Add buffered channel to prevent deadlock on cmd exit