I get the sense that the translation of the Pali term sati (S., smṛti), which is often rendered mindfulness, needs some work. Mindfulness, in this case, is somewhat of a claque, and for that reason has limited value. Here Malunkyaputta responds to the Buddha’s teaching giving his understanding of it.
On seeing a visible form, being mindful [sati/smṛti] one is not attached to visible forms. One feels it with a detached mind and does not cling to it. One lives mindfully in such a way that when one sees a visible form and even experiences a feeling, [suffering] is exhausted, not accumulated. For one who diminishes suffering thus, Nibbana is said to be near . . . (S. iv. 75).
At first, the sense of mindful in Malunkyaputta’s words is something like awareness, that is, being aware of objects like the table in front of me or my coffee cup. So, one just lives their life being aware of objects, right? Wrong. Buddhism’s sati/smṛti like the Greek term anamnesis (ἀνάμνησις) which means remembrance, recollection is saying something else. Remembrance or recollection is direct recollection, a special kind of recollection that doesn’t rely on the intellect or the senses. It is direct cognition of true reality, that is, a direct remembrance or recollection of true reality which has always been present. We just couldn’t remember this reality. Being mindful is recollecting true reality which is prior to visible forms, feelings, etc. One lives recollecting this primordial reality.
It is also with sati that ideations (saññā/samjñā) or percepta can be overcome which if we can’t overcome we will be unable to reach the far shore of nirvana. Sati is what works on ideations to minimize their influence, in effect, to free us from them. The Sutta-Nipata teaches both the practice of sati (768, 771, 855, 916, 933, 962, 964, 973, 974, 975) and dissociation from saññā/samjñā (792, 802, 841, 847, 874, 886).
“Therefore a mindful person should always avoid sensual pleasures. Having abandoned them he would cross over the flood, like one who had gone to the far shore after baling out this boat’ (771).
“By him not even a minute perception [saññā/samjñā] has been formed here in respect of what is seen, heard, or thought. How could anyone in the world have doubts about that brahman, who does not adopt a view” (802).
“One who is detached from saññā/samjñā have no ties. One who is liberated through wisdom has no illusions. Those who have grasped saññā/samjñā and view wander clashing in the world” (847).
Just to conclude, mindfulness means more than just being aware. It is the recollection of fundamental reality which allows us to distinguish root from branch.