In the common printed editions of the book Nefesh HaChaim by Chaim of Volozhin there are glosses ("hagahhot") included in the text at several points in smaller letters. Could you tell me who wrote them? My impression is every available edition has them. Here is an example of one in the first chapter: hebrewbooks
The notes in Nefesh HaChaim are from the author, R' Chaim of Volozhin. The one exception is the extremely long note that begins in the first chapter, which was written by his son, R' Yitzchak. (This note is conventionally referred to as the הגה"ה מהרי"ץ, and is practically a work in its right - with its own notes!)
In older editions, there is a note at the end of the first shaar stating that this note is from R' Yitzchak. In some newer editions, the entire note has been moved to the end of the shaar, with a note on the first page.
In the Tanya, the glosses (in a similar format) were written by the Baal HaTanya himself. They are a sidebar of sorts, which discuss connected but tangential subjects. Sometimes they resolve contradictions.
See for example, the note in Chapter 2: http://www.chabad.org/library/tanya/tanya_cdo/aid/7881/jewish/Chapter-2.htm
My guess is that the glosses in the Nefesh Hachayim are also from the author.