For the z/OS based agents history is collected to a set of files called the Persistent Data Store (or the PDS). When you look at SYSOUT output in the agent task (the TEMA) or the TEMS, assuming that the PDS is config'ed you will see lots of messages related to PDS initialization and usage. If there are issues with the PDS then you will likely experience issues if you try to use the history functions in the Tivoli Portal (the TEP).
Here is a link to a short tech note that menttions some common debugging steps and recommended maintenance level for PDS and history support.
One of the suggestion is to just try re-allocating the PDS files using the jobs you get in the ICAT installer. To be honest, on more than once occasion, I've seen glitchy behavior in the PDS and in history collection that has been addressed by re-creating these files.