return { kind: 'notFound' };
}
// Verify the PID is still alive
const { code: killCode } = await exec(`kill -0 ${state.pid} 2>/dev/null`, { ignoreExitCode: true });
if (killCode !== 0) {
logService.info(`${LOG_PREFIX} Stale agent host state in ${stateFile} (PID ${state.pid} not running), cleaning up`);
await exec(`rm -f ${stateFile}`, { ignoreExitCode: true });