Revert "Fix: Agent connection error handling"

This reverts commit 55fe83f9c800fd39303308c9eec43cfed8a5c82c.