Adjectives end in t when the noun is singular neuter and has an indefinite article (et in your example); but they end in e when the noun takes the definite article (the noun ending -et in your example). There may be some exceptions, but I cannot think of any.
Actually, it's a little more complicated. Hele/heile is not an ordinary adjective here, but more like a quantifier.
There is a difference between det hele gode brødet and hele det gode brødet.
The former means 'the complete good (loaf of) bread', i.e. the bread has not been divided.
The latter means 'all of the good (loaf of) bread', which just means all of it.
In littlepond's example, it's the latter. If it were the ordinary adjective, it would have had to be det hele brødet, with det in front of hele.