             }
                                    
                                    // Show success toast
                                    const action = isActive ? 'pause' : 'start';
                                    showToast(`Agent "${agent}" ${action}ed successfully`, 'success');
                                    
                                    // Update the status badge
                                    updateAgentStatus(agent, newState);
                                } else if (res