promptdojo_

The toy context_health function rejects a session when the total token count is over 6000. The session log has six turns and is over the limit. Drop the two oldest turns (turns 1 and 2) so the script prints exactly healthy.

Expected output:

healthy
The break is on lines 2, 3 — but read the whole snippet first.

this step needs the editor

on desktop today; in the app (coming soon). save your spot and we'll bring you back here when you're ready.

open this same url on a laptop to keep going today.