I found it. It’s in the commentary to SN 10.7
241. The Seventh Story: At Jetavana
Context:
At that time, during sunset, the Buddha was residing at Jetavana, in the Kosambakakuṭi located on the monastery’s outskirts. After his midday meal, the Buddha gave a discourse to a large assembly, and after dismissing them, he bathed and sat in meditation in the Gandhakuṭi (Fragrant Chamber), reflecting on the eastern world-systems.
Monks who were forest-dwellers, wanderers, and wearers of rag-robes left their dwelling places to visit the Buddha. They bowed to him and, like an encircling red cloth, sat around him. Knowing their dispositions, the Buddha delivered a dhamma talk connected to Nibbāna.
The Yakkhinī’s Journey
A yakkhinī (female spirit) was searching for food in the area behind Jetavana. Carrying her daughter on her hip and leading her son by hand, she wandered near the boundary wall of Jetavana, scavenging for leftovers such as spittle, discarded food, and filth. Gradually, she approached the gateway to Jetavana.
The Buddha’s voice, when instructing Ānanda or giving teachings, reached no further than twelve arms’ length, ensuring the sweet sound of his voice was preserved. When delivering dhamma to a vast assembly, even if it extended to the ends of the universe, his voice remained clear, and not a syllable escaped beyond the audience.
The yakkhinī, however, initially could not hear the sound while standing outside the perimeter. But upon reaching the gateway, where the Buddha’s voice resonated directly, she beheld the Gandhakuṭi. Struck by reverence for the Buddha, she stood motionless, her hands still, like a flame in a windless place.
She thought, “Surely, there will be some leftovers here—perhaps drops of ghee, oil, or honey dripping from bowls or hands, or something fallen to the ground.” With this hope, she entered the monastery. The guardian deity stationed at the gate, recognizing the yakkhinī’s potential for liberation, did not prevent her entry.
Upon entering and hearing the Buddha’s sweet voice, the sound penetrated her very being, reaching her bones and heart. She became motionless, absorbed in listening to the dhamma. However, her son, too young to appreciate the teachings, repeatedly urged her:
“Mother, why do you keep stopping and standing still? Why aren’t you searching for food for me to eat?”
Annoyed, she silenced him, saying, “Be quiet, dear one, do not disturb me while I listen to the dhamma.”
Her Reflection
When she said, “Be silent until I finish listening,” she expressed her longing for liberation from all bonds, referring to Nibbāna as “the release from all ties.” The yakkhinī recognized her condition as one of suffering and yearning. She understood the dhamma as surpassing all worldly attachments and aspirations.
The Buddha’s Insight
Seeing the yakkhinī and her son had the potential to attain Sotāpatti (Stream-entry), the Buddha tailored his teaching to reveal the Four Noble Truths. Listening to this, the yakkhinī, along with her son, attained Sotāpatti on the spot.
Her daughter, however, though endowed with supporting conditions for liberation, was too young to comprehend the teaching fully and could not yet attain the same realization.
The Yakkhinī’s Rejoicing
The yakkhinī, filled with joy, said to her son:
“Indeed, it is good to be wise! Today, I have risen from the cycle of suffering and reached liberation in the Buddha’s dispensation. May you, too, be happy.”
She then expressed her wish for her daughter:
“May my daughter, Uttarā, also hear and rejoice in our attainment of the Four Noble Truths.”
With the realization of the dhamma, she relinquished all ties to her previous pisāca (spirit) existence and, along with her son, attained celestial bliss. Her daughter, by virtue of her mother’s merit and influence, also gained a share in this newfound prosperity, much like children inheriting their parents’ wealth.
Afterward
From that day forward, the yakkhinī and her children resided near a tree close to the Gandhakuṭi, where they could see the Buddha and listen to his teachings every morning and evening. They lived peacefully, benefiting from the dhamma and enjoying their celestial existence.
This concludes the seventh story.
241. Sattame tena kho pana samayenāti katarasamayena? Sūriyassa atthaṅgamanasamayena. Tadā kira bhagavā pacchābhatte mahājanassa dhammaṃ desetvā mahājanaṃ uyyojetvā nhānakoṭṭhake nhatvā gandhakuṭipariveṇe paññattavarabuddhāsane puratthimalokadhātuṃ olokayamāno nisīdi. Athekacārikadvicārikādayo paṃsukūlikapiṇḍapātikabhikkhū attano attano vasanaṭṭhānehi nikkhamitvā āgamma dasabalaṃ vanditvā rattasāṇiyā parikkhipamānā viya nisīdiṃsu. Atha nesaṃ ajjhāsayaṃ viditvā satthā nibbānapaṭisaṃyuttaṃ dhammakathaṃ kathesi.
Evaṃ tosesīti sā kira dhītaraṃ aṅkenādāya puttaṃ aṅguliyā gahetvā jetavanapiṭṭhiyaṃ pākāraparikkhepasamīpe uccārapassāvakheḷasiṅghāṇikaṃ pariyesamānā anupubbena jetavanadvārakoṭṭhakaṃ sampattā. Bhagavato ca, ‘‘ānanda, pattaṃ āhara, cīvaraṃ āhara, vighāsādānaṃ dānaṃ dehī’’ti kathentassa saddo samantā dvādasahatthamattameva gaṇhāti. Dhammaṃ desentassa sacepi cakkavāḷapariyantaṃ katvā parisā nisīdati, yathā parisaṃ gacchati, bahiparisāya ekaṅgulimattampi na niggacchati, ‘‘mā akāraṇā madhurasaddo nassī’’ti. Tatrāyaṃ yakkhinī bahiparisāya ṭhitā saddaṃ na suṇāti, dvārakoṭṭhake ṭhitāya panassā mahatiyā buddhavīthiyā abhimukhe ṭhitā gandhakuṭi paññāyi. Sā nivāte dīpasikhā viya buddhagāravena hatthakukkuccādirahitaṃ niccalaṃ parisaṃ disvā – ‘‘nūna mettha kiñci bhājanīyabhaṇḍaṃ bhavissati, yato ahaṃ sappitelamadhuphāṇitādīsu kiñcideva pattato vā hatthato vā paggharantaṃ bhūmiyaṃ vā pana patitaṃ labhissāmī’’ti antovihāraṃ pāvisi. Dvārakoṭṭhake avaruddhakānaṃ nivāraṇatthāya ṭhitā ārakkhadevatā yakkhiniyā upanissayaṃ disvā na nivāresi. Tassā saha parisāya ekībhāvagamanena madhurassaro chaviādīni chinditvā aṭṭhimiñjaṃ āhacca aṭṭhāsi. Taṃ dhammassavanatthāya niccalaṃ ṭhitaṃ purimanayeneva puttakā codayiṃsu. Sā ‘‘dhammassavanassa me antarāyaṃ karontī’’ti puttake tuṇhī uttarike hohīti evaṃ tosesi.
Tattha yāvāti yāva dhammaṃ suṇāmi, tāva tuṇhī hohīti attho. Sabbaganthappamocananti nibbānaṃ āgamma sabbe ganthā pamuccanti, tasmā taṃ sabbaganthappamocananti vuccati. Ativelāti velātikkantā pamāṇātikkantā. Piyāyanāti magganā patthanā. Tato piyataranti yā ayaṃ assa dhammassa magganā patthanā, idaṃ mayhaṃ tato piyataranti attho. Piyatarāti vā pāṭho. Pāṇinanti yathā pāṇīnaṃ dukkhā moceti. Ke mocetīti? Pāṇineti āharitvā vattabbaṃ. Yaṃ dhammaṃ abhisambuddhanti, yaṃ dhammaṃ bhagavā abhisambuddho. Tuṇhībhūtāyamuttarāti na kevalaṃ ahameva, ayaṃ me bhaginī uttarāpi tuṇhībhūtāti vadati. Saddhammassa anaññāyāti, amma, mayaṃ pubbepi imaṃ saddhammameva ajānitvā idāni idaṃ khuppipāsādidukkhaṃ anubhavantā dukkhaṃ carāma viharāma.
Cakkhumāti pañcahi cakkhūhi cakkhumā. Dhammaṃ desentoyeva bhagavā parisaṃ sallakkhayamāno tassā yakkhiniyā ceva yakkhadārakassa ca sotāpattiphalassa upanissayaṃ disvā desanaṃ vinivaṭṭetvā catusaccakathaṃ dīpeti, taṃ sutvā tasmiṃyeva dese ṭhitā yakkhinī saddhiṃ puttena sotāpattiphale patiṭṭhitā. Dhītuyāpi panassā upanissayo atthi, atidaharattā pana desanaṃ sampaṭicchituṃ nāsakkhi.
Idāni sā yakkhinī puttassa anumodanaṃ karontī sādhu kho paṇḍito nāmātiādimāha. Ajjāhamhi samuggatāti ahamhi ajja vaṭṭato uggatā samuggatā sāsane vā uggatā samuggatā, tvampi sukhī hohīti. Diṭṭhānīti mayā ca tayā ca diṭṭhāni. Uttarāpi suṇātu meti, ‘‘amhākaṃ catusaccapaṭivedhabhāvaṃ, dhītā me uttarāpi, suṇātū’’ti vadati. Saha saccapaṭivedheneva sāpi sūcilomo viya sabbaṃ setakaṇḍukacchuādibhāvaṃ pahāya dibbasampattiṃ paṭilabhati saddhiṃ puttena. Dhītā panassā yathā nāma loke mātāpitūhi issariye laddhe puttānampi taṃ hoti, evaṃ mātu-ānubhāveneva sampattiṃ labhi. Tato paṭṭhāya ca sā saddhiṃ puttakehi gandhakuṭisamīparukkheyeva nivāsarukkhaṃ labhitvā sāyaṃ pātaṃ buddhadassanaṃ labhamānā dhammaṃ suṇamānā dīgharattaṃ tattheva vasi. Sattamaṃ.
In this case, a yakkhini was searching for food to eat. They were extremely poor but they could still attain stream entry so they weren’t petas. They were lower class of devas.